stream-chat 5.6.0 → 6.2.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/README.md +59 -114
- package/dist/browser.es.js +464 -366
- 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 +464 -366
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +464 -366
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +464 -366
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +124 -124
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/channel_state.d.ts +41 -41
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +190 -163
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client_state.d.ts +6 -6
- package/dist/types/client_state.d.ts.map +1 -1
- package/dist/types/connection.d.ts +10 -10
- package/dist/types/connection.d.ts.map +1 -1
- package/dist/types/connection_fallback.d.ts +7 -7
- package/dist/types/connection_fallback.d.ts.map +1 -1
- package/dist/types/insights.d.ts +2 -2
- package/dist/types/token_manager.d.ts +6 -6
- package/dist/types/token_manager.d.ts.map +1 -1
- package/dist/types/types.d.ts +404 -236
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +2 -2
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/channel.ts +196 -290
- package/src/channel_state.ts +54 -219
- package/src/client.ts +297 -524
- package/src/client_state.ts +6 -6
- package/src/connection.ts +7 -22
- package/src/connection_fallback.ts +7 -21
- package/src/token_manager.ts +6 -6
- package/src/types.ts +540 -487
- package/src/utils.ts +7 -11
package/dist/index.es.js
CHANGED
|
@@ -255,7 +255,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
255
255
|
/**
|
|
256
256
|
* addMessageSorted - Add a message to the state
|
|
257
257
|
*
|
|
258
|
-
* @param {MessageResponse<
|
|
258
|
+
* @param {MessageResponse<StreamChatGenerics>} newMessage A new message
|
|
259
259
|
* @param {boolean} timestampChanged Whether updating a message with changed created_at value.
|
|
260
260
|
* @param {boolean} addIfDoesNotExist Add message if it is not in the list, used to prevent out of order updated messages from being added.
|
|
261
261
|
*
|
|
@@ -273,7 +273,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
273
273
|
* formatMessage - Takes the message object. Parses the dates, sets __html
|
|
274
274
|
* and sets the status to received if missing. Returns a message object
|
|
275
275
|
*
|
|
276
|
-
* @param {MessageResponse<
|
|
276
|
+
* @param {MessageResponse<StreamChatGenerics>} message a message object
|
|
277
277
|
*
|
|
278
278
|
*/
|
|
279
279
|
|
|
@@ -295,7 +295,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
295
295
|
/**
|
|
296
296
|
* addMessagesSorted - Add the list of messages to state and resorts the messages
|
|
297
297
|
*
|
|
298
|
-
* @param {Array<MessageResponse<
|
|
298
|
+
* @param {Array<MessageResponse<StreamChatGenerics>>} newMessages A list of messages
|
|
299
299
|
* @param {boolean} timestampChanged Whether updating messages with changed created_at value.
|
|
300
300
|
* @param {boolean} initializing Whether channel is being initialized.
|
|
301
301
|
* @param {boolean} addIfDoesNotExist Add message if it is not in the list, used to prevent out of order updated messages from being added.
|
|
@@ -374,7 +374,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
374
374
|
/**
|
|
375
375
|
* addPinnedMessages - adds messages in pinnedMessages property
|
|
376
376
|
*
|
|
377
|
-
* @param {Array<MessageResponse<
|
|
377
|
+
* @param {Array<MessageResponse<StreamChatGenerics>>} pinnedMessages A list of pinned messages
|
|
378
378
|
*
|
|
379
379
|
*/
|
|
380
380
|
|
|
@@ -388,7 +388,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
388
388
|
/**
|
|
389
389
|
* addPinnedMessage - adds message in pinnedMessages
|
|
390
390
|
*
|
|
391
|
-
* @param {MessageResponse<
|
|
391
|
+
* @param {MessageResponse<StreamChatGenerics>} pinnedMessage message to update
|
|
392
392
|
*
|
|
393
393
|
*/
|
|
394
394
|
|
|
@@ -400,7 +400,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
400
400
|
/**
|
|
401
401
|
* removePinnedMessage - removes pinned message from pinnedMessages
|
|
402
402
|
*
|
|
403
|
-
* @param {MessageResponse<
|
|
403
|
+
* @param {MessageResponse<StreamChatGenerics>} message message to remove
|
|
404
404
|
*
|
|
405
405
|
*/
|
|
406
406
|
|
|
@@ -554,7 +554,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
554
554
|
/**
|
|
555
555
|
* _addToMessageList - Adds a message to a list of messages, tries to update first, appends if message isn't found
|
|
556
556
|
*
|
|
557
|
-
* @param {Array<ReturnType<ChannelState<
|
|
557
|
+
* @param {Array<ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>>} messages A list of messages
|
|
558
558
|
* @param message
|
|
559
559
|
* @param {boolean} timestampChanged Whether updating a message with changed created_at value.
|
|
560
560
|
* @param {string} sortBy field name to use to sort the messages by
|
|
@@ -812,13 +812,14 @@ function isFileWebAPI(uri) {
|
|
|
812
812
|
return typeof window !== 'undefined' && 'File' in window && uri instanceof File;
|
|
813
813
|
}
|
|
814
814
|
|
|
815
|
+
function isOwnUser(user) {
|
|
816
|
+
return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
|
|
817
|
+
}
|
|
818
|
+
|
|
815
819
|
function isBlobWebAPI(uri) {
|
|
816
820
|
return typeof window !== 'undefined' && 'Blob' in window && uri instanceof Blob;
|
|
817
821
|
}
|
|
818
822
|
|
|
819
|
-
function isOwnUser(user) {
|
|
820
|
-
return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
|
|
821
|
-
}
|
|
822
823
|
function isOwnUserBaseProperty(property) {
|
|
823
824
|
var ownUserBaseProperties = {
|
|
824
825
|
channel_mutes: true,
|
|
@@ -1013,12 +1014,12 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1013
1014
|
/**
|
|
1014
1015
|
* constructor - Create a channel
|
|
1015
1016
|
*
|
|
1016
|
-
* @param {StreamChat<
|
|
1017
|
+
* @param {StreamChat<StreamChatGenerics>} client the chat client
|
|
1017
1018
|
* @param {string} type the type of channel
|
|
1018
1019
|
* @param {string} [id] the id of the chat
|
|
1019
|
-
* @param {ChannelData<
|
|
1020
|
+
* @param {ChannelData<StreamChatGenerics>} data any additional custom params
|
|
1020
1021
|
*
|
|
1021
|
-
* @return {Channel<
|
|
1022
|
+
* @return {Channel<StreamChatGenerics>} Returns a new uninitialized channel
|
|
1022
1023
|
*/
|
|
1023
1024
|
function Channel(client, type, id, data) {
|
|
1024
1025
|
var _this = this;
|
|
@@ -1137,7 +1138,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1137
1138
|
/**
|
|
1138
1139
|
* getClient - Get the chat client for this channel. If client.disconnect() was called, this function will error
|
|
1139
1140
|
*
|
|
1140
|
-
* @return {StreamChat<
|
|
1141
|
+
* @return {StreamChat<StreamChatGenerics>}
|
|
1141
1142
|
*/
|
|
1142
1143
|
|
|
1143
1144
|
|
|
@@ -1165,11 +1166,11 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1165
1166
|
/**
|
|
1166
1167
|
* sendMessage - Send a message to this channel
|
|
1167
1168
|
*
|
|
1168
|
-
* @param {Message<
|
|
1169
|
+
* @param {Message<StreamChatGenerics>} message The Message object
|
|
1169
1170
|
* @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
|
|
1170
1171
|
* @param {boolean} [options.skip_push] Skip sending push notifications
|
|
1171
1172
|
*
|
|
1172
|
-
* @return {Promise<SendMessageAPIResponse<
|
|
1173
|
+
* @return {Promise<SendMessageAPIResponse<StreamChatGenerics>>} The Server Response
|
|
1173
1174
|
*/
|
|
1174
1175
|
|
|
1175
1176
|
}, {
|
|
@@ -1233,9 +1234,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1233
1234
|
/**
|
|
1234
1235
|
* sendEvent - Send an event on this channel
|
|
1235
1236
|
*
|
|
1236
|
-
* @param {Event<
|
|
1237
|
+
* @param {Event<StreamChatGenerics>} event for example {type: 'message.read'}
|
|
1237
1238
|
*
|
|
1238
|
-
* @return {Promise<EventAPIResponse<
|
|
1239
|
+
* @return {Promise<EventAPIResponse<StreamChatGenerics>>} The Server Response
|
|
1239
1240
|
*/
|
|
1240
1241
|
|
|
1241
1242
|
}, {
|
|
@@ -1273,10 +1274,10 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1273
1274
|
/**
|
|
1274
1275
|
* search - Query messages
|
|
1275
1276
|
*
|
|
1276
|
-
* @param {MessageFilters<
|
|
1277
|
-
* @param {{client_id?: string; connection_id?: string; query?: string; message_filter_conditions?: MessageFilters<
|
|
1277
|
+
* @param {MessageFilters<StreamChatGenerics> | string} query search query or object MongoDB style filters
|
|
1278
|
+
* @param {{client_id?: string; connection_id?: string; query?: string; message_filter_conditions?: MessageFilters<StreamChatGenerics>}} options Option object, {user_id: 'tommaso'}
|
|
1278
1279
|
*
|
|
1279
|
-
* @return {Promise<SearchAPIResponse<
|
|
1280
|
+
* @return {Promise<SearchAPIResponse<StreamChatGenerics>>} search messages response
|
|
1280
1281
|
*/
|
|
1281
1282
|
|
|
1282
1283
|
}, {
|
|
@@ -1361,12 +1362,12 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1361
1362
|
/**
|
|
1362
1363
|
* queryMembers - Query Members
|
|
1363
1364
|
*
|
|
1364
|
-
* @param {UserFilters<
|
|
1365
|
-
* @param {MemberSort<
|
|
1365
|
+
* @param {UserFilters<StreamChatGenerics>} filterConditions object MongoDB style filters
|
|
1366
|
+
* @param {MemberSort<StreamChatGenerics>} [sort] Sort options, for instance [{created_at: -1}].
|
|
1366
1367
|
* When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{name: -1}, {created_at: 1}]
|
|
1367
1368
|
* @param {{ limit?: number; offset?: number }} [options] Option object, {limit: 10, offset:10}
|
|
1368
1369
|
*
|
|
1369
|
-
* @return {Promise<ChannelMemberAPIResponse<
|
|
1370
|
+
* @return {Promise<ChannelMemberAPIResponse<StreamChatGenerics>>} Query Members response
|
|
1370
1371
|
*/
|
|
1371
1372
|
|
|
1372
1373
|
}, {
|
|
@@ -1428,10 +1429,10 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1428
1429
|
* sendReaction - Send a reaction about a message
|
|
1429
1430
|
*
|
|
1430
1431
|
* @param {string} messageID the message id
|
|
1431
|
-
* @param {Reaction<
|
|
1432
|
+
* @param {Reaction<StreamChatGenerics>} reaction the reaction object for instance {type: 'love'}
|
|
1432
1433
|
* @param {{ enforce_unique?: boolean, skip_push?: boolean }} [options] Option object, {enforce_unique: true, skip_push: true} to override any existing reaction or skip sending push notifications
|
|
1433
1434
|
*
|
|
1434
|
-
* @return {Promise<ReactionAPIResponse<
|
|
1435
|
+
* @return {Promise<ReactionAPIResponse<StreamChatGenerics>>} The Server Response
|
|
1435
1436
|
*/
|
|
1436
1437
|
|
|
1437
1438
|
}, {
|
|
@@ -1487,7 +1488,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1487
1488
|
* @param {string} reactionType the type of reaction that should be removed
|
|
1488
1489
|
* @param {string} [user_id] the id of the user (used only for server side request) default null
|
|
1489
1490
|
*
|
|
1490
|
-
* @return {Promise<ReactionAPIResponse<
|
|
1491
|
+
* @return {Promise<ReactionAPIResponse<StreamChatGenerics>>} The Server Response
|
|
1491
1492
|
*/
|
|
1492
1493
|
|
|
1493
1494
|
}, {
|
|
@@ -1512,10 +1513,10 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1512
1513
|
/**
|
|
1513
1514
|
* update - Edit the channel's custom properties
|
|
1514
1515
|
*
|
|
1515
|
-
* @param {ChannelData<
|
|
1516
|
-
* @param {Message<
|
|
1516
|
+
* @param {ChannelData<StreamChatGenerics>} channelData The object to update the custom properties of this channel with
|
|
1517
|
+
* @param {Message<StreamChatGenerics>} [updateMessage] Optional message object for channel members notification
|
|
1517
1518
|
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
1518
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1519
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1519
1520
|
*/
|
|
1520
1521
|
|
|
1521
1522
|
}, {
|
|
@@ -1565,9 +1566,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1565
1566
|
/**
|
|
1566
1567
|
* updatePartial - partial update channel properties
|
|
1567
1568
|
*
|
|
1568
|
-
* @param {PartialUpdateChannel<
|
|
1569
|
+
* @param {PartialUpdateChannel<StreamChatGenerics>} partial update request
|
|
1569
1570
|
*
|
|
1570
|
-
* @return {Promise<PartialUpdateChannelAPIResponse<
|
|
1571
|
+
* @return {Promise<PartialUpdateChannelAPIResponse<StreamChatGenerics>>}
|
|
1571
1572
|
*/
|
|
1572
1573
|
|
|
1573
1574
|
}, {
|
|
@@ -1602,7 +1603,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1602
1603
|
* enableSlowMode - enable slow mode
|
|
1603
1604
|
*
|
|
1604
1605
|
* @param {number} coolDownInterval the cooldown interval in seconds
|
|
1605
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1606
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1606
1607
|
*/
|
|
1607
1608
|
|
|
1608
1609
|
}, {
|
|
@@ -1641,7 +1642,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1641
1642
|
/**
|
|
1642
1643
|
* disableSlowMode - disable slow mode
|
|
1643
1644
|
*
|
|
1644
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1645
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1645
1646
|
*/
|
|
1646
1647
|
|
|
1647
1648
|
}, {
|
|
@@ -1682,7 +1683,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1682
1683
|
*
|
|
1683
1684
|
* @param {boolean} [options.hard_delete] Defines if the channel is hard deleted or not
|
|
1684
1685
|
*
|
|
1685
|
-
* @return {Promise<DeleteChannelAPIResponse<
|
|
1686
|
+
* @return {Promise<DeleteChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1686
1687
|
*/
|
|
1687
1688
|
|
|
1688
1689
|
}, {
|
|
@@ -1718,8 +1719,8 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1718
1719
|
}()
|
|
1719
1720
|
/**
|
|
1720
1721
|
* truncate - Removes all messages from the channel
|
|
1721
|
-
* @param {TruncateOptions<
|
|
1722
|
-
* @return {Promise<TruncateChannelAPIResponse<
|
|
1722
|
+
* @param {TruncateOptions<StreamChatGenerics>} [options] Defines truncation options
|
|
1723
|
+
* @return {Promise<TruncateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1723
1724
|
*/
|
|
1724
1725
|
|
|
1725
1726
|
}, {
|
|
@@ -1756,9 +1757,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1756
1757
|
/**
|
|
1757
1758
|
* acceptInvite - accept invitation to the channel
|
|
1758
1759
|
*
|
|
1759
|
-
* @param {InviteOptions<
|
|
1760
|
+
* @param {InviteOptions<StreamChatGenerics>} [options] The object to update the custom properties of this channel with
|
|
1760
1761
|
*
|
|
1761
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1762
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1762
1763
|
*/
|
|
1763
1764
|
|
|
1764
1765
|
}, {
|
|
@@ -1797,9 +1798,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1797
1798
|
/**
|
|
1798
1799
|
* rejectInvite - reject invitation to the channel
|
|
1799
1800
|
*
|
|
1800
|
-
* @param {InviteOptions<
|
|
1801
|
+
* @param {InviteOptions<StreamChatGenerics>} [options] The object to update the custom properties of this channel with
|
|
1801
1802
|
*
|
|
1802
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1803
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1803
1804
|
*/
|
|
1804
1805
|
|
|
1805
1806
|
}, {
|
|
@@ -1839,9 +1840,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1839
1840
|
* addMembers - add members to the channel
|
|
1840
1841
|
*
|
|
1841
1842
|
* @param {{user_id: string, channel_role?: Role}[]} members An array of members to add to the channel
|
|
1842
|
-
* @param {Message<
|
|
1843
|
+
* @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
|
|
1843
1844
|
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
1844
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1845
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1845
1846
|
*/
|
|
1846
1847
|
|
|
1847
1848
|
}, {
|
|
@@ -1882,9 +1883,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1882
1883
|
* addModerators - add moderators to the channel
|
|
1883
1884
|
*
|
|
1884
1885
|
* @param {string[]} members An array of member identifiers
|
|
1885
|
-
* @param {Message<
|
|
1886
|
+
* @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
|
|
1886
1887
|
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
1887
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1888
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1888
1889
|
*/
|
|
1889
1890
|
|
|
1890
1891
|
}, {
|
|
@@ -1925,9 +1926,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1925
1926
|
* assignRoles - sets member roles in a channel
|
|
1926
1927
|
*
|
|
1927
1928
|
* @param {{channel_role: Role, user_id: string}[]} roles List of role assignments
|
|
1928
|
-
* @param {Message<
|
|
1929
|
+
* @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
|
|
1929
1930
|
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
1930
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1931
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1931
1932
|
*/
|
|
1932
1933
|
|
|
1933
1934
|
}, {
|
|
@@ -1968,9 +1969,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1968
1969
|
* inviteMembers - invite members to the channel
|
|
1969
1970
|
*
|
|
1970
1971
|
* @param {{user_id: string, channel_role?: Role}[]} members An array of members to invite to the channel
|
|
1971
|
-
* @param {Message<
|
|
1972
|
+
* @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
|
|
1972
1973
|
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
1973
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
1974
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
1974
1975
|
*/
|
|
1975
1976
|
|
|
1976
1977
|
}, {
|
|
@@ -2011,9 +2012,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2011
2012
|
* removeMembers - remove members from channel
|
|
2012
2013
|
*
|
|
2013
2014
|
* @param {string[]} members An array of member identifiers
|
|
2014
|
-
* @param {Message<
|
|
2015
|
+
* @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
|
|
2015
2016
|
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
2016
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
2017
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
2017
2018
|
*/
|
|
2018
2019
|
|
|
2019
2020
|
}, {
|
|
@@ -2054,9 +2055,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2054
2055
|
* demoteModerators - remove moderator role from channel members
|
|
2055
2056
|
*
|
|
2056
2057
|
* @param {string[]} members An array of member identifiers
|
|
2057
|
-
* @param {Message<
|
|
2058
|
+
* @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
|
|
2058
2059
|
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
2059
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
2060
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
2060
2061
|
*/
|
|
2061
2062
|
|
|
2062
2063
|
}, {
|
|
@@ -2096,7 +2097,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2096
2097
|
/**
|
|
2097
2098
|
* _update - executes channel update request
|
|
2098
2099
|
* @param payload Object Update Channel payload
|
|
2099
|
-
* @return {Promise<UpdateChannelAPIResponse<
|
|
2100
|
+
* @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
2100
2101
|
* TODO: introduce new type instead of Object in the next major update
|
|
2101
2102
|
*/
|
|
2102
2103
|
|
|
@@ -2134,7 +2135,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2134
2135
|
/**
|
|
2135
2136
|
* mute - mutes the current channel
|
|
2136
2137
|
* @param {{ user_id?: string, expiration?: string }} opts expiration in minutes or user_id
|
|
2137
|
-
* @return {Promise<MuteChannelAPIResponse<
|
|
2138
|
+
* @return {Promise<MuteChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
2138
2139
|
*
|
|
2139
2140
|
* example with expiration:
|
|
2140
2141
|
* await channel.mute({expiration: moment.duration(2, 'weeks')});
|
|
@@ -2353,7 +2354,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2353
2354
|
/**
|
|
2354
2355
|
* lastMessage - return the last message, takes into account that last few messages might not be perfectly sorted
|
|
2355
2356
|
*
|
|
2356
|
-
* @return {ReturnType<ChannelState<
|
|
2357
|
+
* @return {ReturnType<ChannelState<StreamChatGenerics>['formatMessage']> | undefined} Description
|
|
2357
2358
|
*/
|
|
2358
2359
|
|
|
2359
2360
|
}, {
|
|
@@ -2378,8 +2379,8 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2378
2379
|
/**
|
|
2379
2380
|
* markRead - Send the mark read event for this user, only works if the `read_events` setting is enabled
|
|
2380
2381
|
*
|
|
2381
|
-
* @param {MarkReadOptions<
|
|
2382
|
-
* @return {Promise<EventAPIResponse<
|
|
2382
|
+
* @param {MarkReadOptions<StreamChatGenerics>} data
|
|
2383
|
+
* @return {Promise<EventAPIResponse<StreamChatGenerics> | null>} Description
|
|
2383
2384
|
*/
|
|
2384
2385
|
|
|
2385
2386
|
}, {
|
|
@@ -2447,9 +2448,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2447
2448
|
/**
|
|
2448
2449
|
* watch - Loads the initial channel state and watches for changes
|
|
2449
2450
|
*
|
|
2450
|
-
* @param {ChannelQueryOptions<
|
|
2451
|
+
* @param {ChannelQueryOptions<StreamChatGenerics>} options additional options for the query endpoint
|
|
2451
2452
|
*
|
|
2452
|
-
* @return {Promise<ChannelAPIResponse<
|
|
2453
|
+
* @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} The server response
|
|
2453
2454
|
*/
|
|
2454
2455
|
|
|
2455
2456
|
}, {
|
|
@@ -2551,9 +2552,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2551
2552
|
* getReplies - List the message replies for a parent message
|
|
2552
2553
|
*
|
|
2553
2554
|
* @param {string} parent_id The message parent id, ie the top of the thread
|
|
2554
|
-
* @param {PaginationOptions & { user?: UserResponse<
|
|
2555
|
+
* @param {PaginationOptions & { user?: UserResponse<StreamChatGenerics>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
|
|
2555
2556
|
*
|
|
2556
|
-
* @return {Promise<GetRepliesAPIResponse<
|
|
2557
|
+
* @return {Promise<GetRepliesAPIResponse<StreamChatGenerics>>} A response with a list of messages
|
|
2557
2558
|
*/
|
|
2558
2559
|
|
|
2559
2560
|
}, {
|
|
@@ -2595,10 +2596,10 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2595
2596
|
/**
|
|
2596
2597
|
* getPinnedMessages - List list pinned messages of the channel
|
|
2597
2598
|
*
|
|
2598
|
-
* @param {PinnedMessagePaginationOptions & { user?: UserResponse<
|
|
2599
|
+
* @param {PinnedMessagePaginationOptions & { user?: UserResponse<StreamChatGenerics>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
|
|
2599
2600
|
* @param {PinnedMessagesSort} sort defines sorting direction of pinned messages
|
|
2600
2601
|
*
|
|
2601
|
-
* @return {Promise<GetRepliesAPIResponse<
|
|
2602
|
+
* @return {Promise<GetRepliesAPIResponse<StreamChatGenerics>>} A response with a list of messages
|
|
2602
2603
|
*/
|
|
2603
2604
|
|
|
2604
2605
|
}, {
|
|
@@ -2642,7 +2643,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2642
2643
|
* @param {string} message_id The message id
|
|
2643
2644
|
* @param {{ limit?: number; offset?: number }} options The pagination options
|
|
2644
2645
|
*
|
|
2645
|
-
* @return {Promise<GetReactionsAPIResponse<
|
|
2646
|
+
* @return {Promise<GetReactionsAPIResponse<StreamChatGenerics>>} Server response
|
|
2646
2647
|
*/
|
|
2647
2648
|
|
|
2648
2649
|
}, {
|
|
@@ -2655,7 +2656,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2655
2656
|
*
|
|
2656
2657
|
* @param {string[]} messageIds The ids of the messages to retrieve from this channel
|
|
2657
2658
|
*
|
|
2658
|
-
* @return {Promise<GetMultipleMessagesAPIResponse<
|
|
2659
|
+
* @return {Promise<GetMultipleMessagesAPIResponse<StreamChatGenerics>>} Server response
|
|
2659
2660
|
*/
|
|
2660
2661
|
|
|
2661
2662
|
}, {
|
|
@@ -2685,14 +2686,16 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2685
2686
|
}, {
|
|
2686
2687
|
key: "_countMessageAsUnread",
|
|
2687
2688
|
value: function _countMessageAsUnread(message) {
|
|
2688
|
-
var _message$user, _message$user2;
|
|
2689
|
+
var _message$user, _message$user2, _this$data2, _this$data3;
|
|
2689
2690
|
|
|
2690
2691
|
if (message.shadowed) return false;
|
|
2691
2692
|
if (message.silent) return false;
|
|
2692
2693
|
if (message.parent_id && !message.show_in_channel) return false;
|
|
2693
2694
|
if (((_message$user = message.user) === null || _message$user === void 0 ? void 0 : _message$user.id) === this.getClient().userID) return false;
|
|
2694
2695
|
if ((_message$user2 = message.user) !== null && _message$user2 !== void 0 && _message$user2.id && this.getClient().userMuteStatus(message.user.id)) return false;
|
|
2695
|
-
if (message.type === 'system') return false;
|
|
2696
|
+
if (message.type === 'system') return false; // Return false if channel doesn't allow read events.
|
|
2697
|
+
|
|
2698
|
+
if (Array.isArray((_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.own_capabilities) && !((_this$data3 = this.data) !== null && _this$data3 !== void 0 && _this$data3.own_capabilities.includes('read-events'))) return false;
|
|
2696
2699
|
if (this.muteStatus().muted) return false;
|
|
2697
2700
|
return true;
|
|
2698
2701
|
}
|
|
@@ -2750,7 +2753,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2750
2753
|
/**
|
|
2751
2754
|
* create - Creates a new channel
|
|
2752
2755
|
*
|
|
2753
|
-
* @return {Promise<ChannelAPIResponse<
|
|
2756
|
+
* @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} The Server Response
|
|
2754
2757
|
*/
|
|
2755
2758
|
|
|
2756
2759
|
}, {
|
|
@@ -2759,9 +2762,9 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2759
2762
|
/**
|
|
2760
2763
|
* query - Query the API, get messages, members or other channel fields
|
|
2761
2764
|
*
|
|
2762
|
-
* @param {ChannelQueryOptions<
|
|
2765
|
+
* @param {ChannelQueryOptions<StreamChatGenerics>} options The query options
|
|
2763
2766
|
*
|
|
2764
|
-
* @return {Promise<ChannelAPIResponse<
|
|
2767
|
+
* @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} Returns a query response
|
|
2765
2768
|
*/
|
|
2766
2769
|
function () {
|
|
2767
2770
|
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(options) {
|
|
@@ -2837,7 +2840,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2837
2840
|
* banUser - Bans a user from a channel
|
|
2838
2841
|
*
|
|
2839
2842
|
* @param {string} targetUserID
|
|
2840
|
-
* @param {BanUserOptions<
|
|
2843
|
+
* @param {BanUserOptions<StreamChatGenerics>} options
|
|
2841
2844
|
* @returns {Promise<APIResponse>}
|
|
2842
2845
|
*/
|
|
2843
2846
|
|
|
@@ -3009,7 +3012,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3009
3012
|
* shadowBan - Shadow bans a user from a channel
|
|
3010
3013
|
*
|
|
3011
3014
|
* @param {string} targetUserID
|
|
3012
|
-
* @param {BanUserOptions<
|
|
3015
|
+
* @param {BanUserOptions<StreamChatGenerics>} options
|
|
3013
3016
|
* @returns {Promise<APIResponse>}
|
|
3014
3017
|
*/
|
|
3015
3018
|
|
|
@@ -3093,8 +3096,8 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3093
3096
|
* or
|
|
3094
3097
|
* channel.on(event => {console.log(event.type)})
|
|
3095
3098
|
*
|
|
3096
|
-
* @param {EventHandler<
|
|
3097
|
-
* @param {EventHandler<
|
|
3099
|
+
* @param {EventHandler<StreamChatGenerics> | EventTypes} callbackOrString The event type to listen for (optional)
|
|
3100
|
+
* @param {EventHandler<StreamChatGenerics>} [callbackOrNothing] The callback to call
|
|
3098
3101
|
*/
|
|
3099
3102
|
|
|
3100
3103
|
}, {
|
|
@@ -3920,7 +3923,6 @@ var StableWSConnection = /*#__PURE__*/function () {
|
|
|
3920
3923
|
_this.isHealthy = healthy;
|
|
3921
3924
|
|
|
3922
3925
|
if (_this.isHealthy) {
|
|
3923
|
-
//@ts-expect-error
|
|
3924
3926
|
_this.client.dispatchEvent({
|
|
3925
3927
|
type: 'connection.changed',
|
|
3926
3928
|
online: _this.isHealthy
|
|
@@ -3931,7 +3933,7 @@ var StableWSConnection = /*#__PURE__*/function () {
|
|
|
3931
3933
|
|
|
3932
3934
|
|
|
3933
3935
|
setTimeout(function () {
|
|
3934
|
-
if (_this.isHealthy) return;
|
|
3936
|
+
if (_this.isHealthy) return;
|
|
3935
3937
|
|
|
3936
3938
|
_this.client.dispatchEvent({
|
|
3937
3939
|
type: 'connection.changed',
|
|
@@ -4901,7 +4903,7 @@ function TokenManager(secret) {
|
|
|
4901
4903
|
* Token provider should return a token string or a promise which resolves to string token.
|
|
4902
4904
|
*
|
|
4903
4905
|
* @param {TokenOrProvider} tokenOrProvider
|
|
4904
|
-
* @param {UserResponse<
|
|
4906
|
+
* @param {UserResponse<StreamChatGenerics>} user
|
|
4905
4907
|
*/
|
|
4906
4908
|
;
|
|
4907
4909
|
|
|
@@ -5393,7 +5395,6 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5393
5395
|
|
|
5394
5396
|
|
|
5395
5397
|
if (this.state === ConnectionState.Connecting && state === ConnectionState.Connected) {
|
|
5396
|
-
//@ts-expect-error
|
|
5397
5398
|
this.client.dispatchEvent({
|
|
5398
5399
|
type: 'connection.changed',
|
|
5399
5400
|
online: true
|
|
@@ -5401,7 +5402,6 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
5401
5402
|
}
|
|
5402
5403
|
|
|
5403
5404
|
if (state === ConnectionState.Closed || state === ConnectionState.Disconnected) {
|
|
5404
|
-
//@ts-expect-error
|
|
5405
5405
|
this.client.dispatchEvent({
|
|
5406
5406
|
type: 'connection.changed',
|
|
5407
5407
|
online: false
|
|
@@ -6694,9 +6694,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6694
6694
|
/**
|
|
6695
6695
|
* setGuestUser - Setup a temporary guest user
|
|
6696
6696
|
*
|
|
6697
|
-
* @param {UserResponse<
|
|
6697
|
+
* @param {UserResponse<StreamChatGenerics>} user Data about this user. IE {name: "john"}
|
|
6698
6698
|
*
|
|
6699
|
-
* @return {ConnectAPIResponse<
|
|
6699
|
+
* @return {ConnectAPIResponse<StreamChatGenerics>} Returns a promise that resolves when the connection is setup
|
|
6700
6700
|
*/
|
|
6701
6701
|
function () {
|
|
6702
6702
|
var _setGuestUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(user) {
|
|
@@ -6784,8 +6784,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6784
6784
|
* or
|
|
6785
6785
|
* client.on(event => {console.log(event.type)})
|
|
6786
6786
|
*
|
|
6787
|
-
* @param {EventHandler<
|
|
6788
|
-
* @param {EventHandler<
|
|
6787
|
+
* @param {EventHandler<StreamChatGenerics> | string} callbackOrString The event type to listen for (optional)
|
|
6788
|
+
* @param {EventHandler<StreamChatGenerics>} [callbackOrNothing] The callback to call
|
|
6789
6789
|
*
|
|
6790
6790
|
* @return {{ unsubscribe: () => void }} Description
|
|
6791
6791
|
*/
|
|
@@ -7002,6 +7002,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7002
7002
|
this.mutedUsers = event.me.mutes;
|
|
7003
7003
|
}
|
|
7004
7004
|
|
|
7005
|
+
if (event.type === 'notification.mark_read') {
|
|
7006
|
+
var activeChannelKeys = Object.keys(this.activeChannels);
|
|
7007
|
+
activeChannelKeys.forEach(function (activeChannelKey) {
|
|
7008
|
+
return _this3.activeChannels[activeChannelKey].state.unreadCount = 0;
|
|
7009
|
+
});
|
|
7010
|
+
}
|
|
7011
|
+
|
|
7005
7012
|
if ((event.type === 'channel.deleted' || event.type === 'notification.channel_deleted') && event.cid) {
|
|
7006
7013
|
var _this$activeChannels$;
|
|
7007
7014
|
|
|
@@ -7120,8 +7127,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7120
7127
|
|
|
7121
7128
|
this.logger('info', 'client:connect() - WS failed, fallback to longpoll', {
|
|
7122
7129
|
tags: ['connection', 'client']
|
|
7123
|
-
});
|
|
7124
|
-
|
|
7130
|
+
});
|
|
7125
7131
|
this.dispatchEvent({
|
|
7126
7132
|
type: 'transport.changed',
|
|
7127
7133
|
mode: 'longpoll'
|
|
@@ -7187,12 +7193,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7187
7193
|
/**
|
|
7188
7194
|
* queryUsers - Query users and watch user presence
|
|
7189
7195
|
*
|
|
7190
|
-
* @param {UserFilters<
|
|
7191
|
-
* @param {UserSort<
|
|
7196
|
+
* @param {UserFilters<StreamChatGenerics>} filterConditions MongoDB style filter conditions
|
|
7197
|
+
* @param {UserSort<StreamChatGenerics>} sort Sort options, for instance [{last_active: -1}].
|
|
7192
7198
|
* When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{last_active: -1}, {created_at: 1}]
|
|
7193
7199
|
* @param {UserOptions} options Option object, {presence: true}
|
|
7194
7200
|
*
|
|
7195
|
-
* @return {Promise<
|
|
7201
|
+
* @return {Promise<{ users: Array<UserResponse<StreamChatGenerics>> }>} User Query Response
|
|
7196
7202
|
*/
|
|
7197
7203
|
|
|
7198
7204
|
}, {
|
|
@@ -7257,7 +7263,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7257
7263
|
* @param {BannedUsersSort} sort Sort options [{created_at: 1}].
|
|
7258
7264
|
* @param {BannedUsersPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
7259
7265
|
*
|
|
7260
|
-
* @return {Promise<BannedUsersResponse<
|
|
7266
|
+
* @return {Promise<BannedUsersResponse<StreamChatGenerics>>} Ban Query Response
|
|
7261
7267
|
*/
|
|
7262
7268
|
|
|
7263
7269
|
}, {
|
|
@@ -7306,7 +7312,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7306
7312
|
* @param {MessageFlagsFilters} filterConditions MongoDB style filter conditions
|
|
7307
7313
|
* @param {MessageFlagsPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
7308
7314
|
*
|
|
7309
|
-
* @return {Promise<MessageFlagsResponse<
|
|
7315
|
+
* @return {Promise<MessageFlagsResponse<StreamChatGenerics>>} Message Flags Response
|
|
7310
7316
|
*/
|
|
7311
7317
|
|
|
7312
7318
|
}, {
|
|
@@ -7349,14 +7355,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7349
7355
|
/**
|
|
7350
7356
|
* queryChannels - Query channels
|
|
7351
7357
|
*
|
|
7352
|
-
* @param {ChannelFilters<
|
|
7353
|
-
* @param {ChannelSort<
|
|
7358
|
+
* @param {ChannelFilters<StreamChatGenerics>} filterConditions object MongoDB style filters
|
|
7359
|
+
* @param {ChannelSort<StreamChatGenerics>} [sort] Sort options, for instance {created_at: -1}.
|
|
7354
7360
|
* When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{last_updated: -1}, {created_at: 1}]
|
|
7355
7361
|
* @param {ChannelOptions} [options] Options object
|
|
7356
7362
|
* @param {ChannelStateOptions} [stateOptions] State options object. These options will only be used for state management and won't be sent in the request.
|
|
7357
7363
|
* - stateOptions.skipInitialization - Skips the initialization of the state for the channels matching the ids in the list.
|
|
7358
7364
|
*
|
|
7359
|
-
* @return {Promise<
|
|
7365
|
+
* @return {Promise<{ channels: Array<ChannelAPIResponse<AStreamChatGenerics>>}> } search channels response
|
|
7360
7366
|
*/
|
|
7361
7367
|
|
|
7362
7368
|
}, {
|
|
@@ -7472,11 +7478,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7472
7478
|
/**
|
|
7473
7479
|
* search - Query messages
|
|
7474
7480
|
*
|
|
7475
|
-
* @param {ChannelFilters<
|
|
7476
|
-
* @param {MessageFilters<
|
|
7477
|
-
* @param {SearchOptions<
|
|
7481
|
+
* @param {ChannelFilters<StreamChatGenerics>} filterConditions MongoDB style filter conditions
|
|
7482
|
+
* @param {MessageFilters<StreamChatGenerics> | string} query search query or object MongoDB style filters
|
|
7483
|
+
* @param {SearchOptions<StreamChatGenerics>} [options] Option object, {user_id: 'tommaso'}
|
|
7478
7484
|
*
|
|
7479
|
-
* @return {Promise<SearchAPIResponse<
|
|
7485
|
+
* @return {Promise<SearchAPIResponse<StreamChatGenerics>>} search messages response
|
|
7480
7486
|
*/
|
|
7481
7487
|
|
|
7482
7488
|
}, {
|
|
@@ -7620,7 +7626,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7620
7626
|
*
|
|
7621
7627
|
* @param {string} [userID] User ID. Only works on serverside
|
|
7622
7628
|
*
|
|
7623
|
-
* @return {
|
|
7629
|
+
* @return {Device<StreamChatGenerics>[]} Array of devices
|
|
7624
7630
|
*/
|
|
7625
7631
|
|
|
7626
7632
|
}, {
|
|
@@ -7748,7 +7754,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7748
7754
|
* await channel.create() to assign an ID to channel
|
|
7749
7755
|
*
|
|
7750
7756
|
* @param {string} channelType The channel type
|
|
7751
|
-
* @param {string | ChannelData<
|
|
7757
|
+
* @param {string | ChannelData<StreamChatGenerics> | null} [channelIDOrCustom] The channel ID, you can leave this out if you want to create a conversation channel
|
|
7752
7758
|
* @param {object} [custom] Custom data to attach to the channel
|
|
7753
7759
|
*
|
|
7754
7760
|
* @return {channel} The channel object, initialize it using channel.watch()
|
|
@@ -7804,10 +7810,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7804
7810
|
/**
|
|
7805
7811
|
* partialUpdateUser - Update the given user object
|
|
7806
7812
|
*
|
|
7807
|
-
* @param {PartialUserUpdate<
|
|
7813
|
+
* @param {PartialUserUpdate<StreamChatGenerics>} partialUserObject which should contain id and any of "set" or "unset" params;
|
|
7808
7814
|
* example: {id: "user1", set:{field: value}, unset:["field2"]}
|
|
7809
7815
|
*
|
|
7810
|
-
* @return {Promise<
|
|
7816
|
+
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
|
|
7811
7817
|
*/
|
|
7812
7818
|
function () {
|
|
7813
7819
|
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(partialUserObject) {
|
|
@@ -7838,9 +7844,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7838
7844
|
/**
|
|
7839
7845
|
* upsertUsers - Batch upsert the list of users
|
|
7840
7846
|
*
|
|
7841
|
-
* @param {UserResponse<
|
|
7847
|
+
* @param {UserResponse<StreamChatGenerics>[]} users list of users
|
|
7842
7848
|
*
|
|
7843
|
-
* @return {Promise<
|
|
7849
|
+
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
7844
7850
|
*/
|
|
7845
7851
|
|
|
7846
7852
|
}, {
|
|
@@ -7926,8 +7932,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7926
7932
|
*
|
|
7927
7933
|
* updateUsers - Batch update the list of users
|
|
7928
7934
|
*
|
|
7929
|
-
* @param {UserResponse<
|
|
7930
|
-
* @return {Promise<
|
|
7935
|
+
* @param {UserResponse<StreamChatGenerics>[]} users list of users
|
|
7936
|
+
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
7931
7937
|
*/
|
|
7932
7938
|
|
|
7933
7939
|
}, {
|
|
@@ -7936,9 +7942,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7936
7942
|
/**
|
|
7937
7943
|
* upsertUser - Update or Create the given user object
|
|
7938
7944
|
*
|
|
7939
|
-
* @param {UserResponse<
|
|
7945
|
+
* @param {UserResponse<StreamChatGenerics>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
|
|
7940
7946
|
*
|
|
7941
|
-
* @return {Promise<
|
|
7947
|
+
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
7942
7948
|
*/
|
|
7943
7949
|
function upsertUser(userObject) {
|
|
7944
7950
|
return this.upsertUsers([userObject]);
|
|
@@ -7948,8 +7954,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7948
7954
|
*
|
|
7949
7955
|
* updateUser - Update or Create the given user object
|
|
7950
7956
|
*
|
|
7951
|
-
* @param {UserResponse<
|
|
7952
|
-
* @return {Promise<
|
|
7957
|
+
* @param {UserResponse<StreamChatGenerics>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
|
|
7958
|
+
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
7953
7959
|
*/
|
|
7954
7960
|
|
|
7955
7961
|
}, {
|
|
@@ -7958,9 +7964,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7958
7964
|
/**
|
|
7959
7965
|
* partialUpdateUsers - Batch partial update of users
|
|
7960
7966
|
*
|
|
7961
|
-
* @param {PartialUserUpdate<
|
|
7967
|
+
* @param {PartialUserUpdate<StreamChatGenerics>[]} users list of partial update requests
|
|
7962
7968
|
*
|
|
7963
|
-
* @return {Promise<
|
|
7969
|
+
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
7964
7970
|
*/
|
|
7965
7971
|
function () {
|
|
7966
7972
|
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(users) {
|
|
@@ -8149,7 +8155,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8149
8155
|
/** banUser - bans a user from all channels
|
|
8150
8156
|
*
|
|
8151
8157
|
* @param {string} targetUserID
|
|
8152
|
-
* @param {BanUserOptions<
|
|
8158
|
+
* @param {BanUserOptions<StreamChatGenerics>} [options]
|
|
8153
8159
|
* @returns {Promise<APIResponse>}
|
|
8154
8160
|
*/
|
|
8155
8161
|
|
|
@@ -8223,7 +8229,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8223
8229
|
/** shadowBan - shadow bans a user from all channels
|
|
8224
8230
|
*
|
|
8225
8231
|
* @param {string} targetUserID
|
|
8226
|
-
* @param {BanUserOptions<
|
|
8232
|
+
* @param {BanUserOptions<StreamChatGenerics>} [options]
|
|
8227
8233
|
* @returns {Promise<APIResponse>}
|
|
8228
8234
|
*/
|
|
8229
8235
|
|
|
@@ -8298,8 +8304,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8298
8304
|
*
|
|
8299
8305
|
* @param {string} targetID
|
|
8300
8306
|
* @param {string} [userID] Only used with serverside auth
|
|
8301
|
-
* @param {MuteUserOptions<
|
|
8302
|
-
* @returns {Promise<MuteUserResponse<
|
|
8307
|
+
* @param {MuteUserOptions<StreamChatGenerics>} [options]
|
|
8308
|
+
* @returns {Promise<MuteUserResponse<StreamChatGenerics>>}
|
|
8303
8309
|
*/
|
|
8304
8310
|
|
|
8305
8311
|
}, {
|
|
@@ -8556,23 +8562,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8556
8562
|
return unflagUser;
|
|
8557
8563
|
}()
|
|
8558
8564
|
/**
|
|
8559
|
-
*
|
|
8565
|
+
* _queryFlags - Query flags.
|
|
8560
8566
|
*
|
|
8561
8567
|
* Note: Do not use this.
|
|
8562
8568
|
* It is present for internal usage only.
|
|
8563
8569
|
* This function can, and will, break and/or be removed at any point in time.
|
|
8564
8570
|
*
|
|
8565
8571
|
* @private
|
|
8566
|
-
* @param {
|
|
8567
|
-
* @param {
|
|
8572
|
+
* @param {FlagsFilters} filterConditions MongoDB style filter conditions
|
|
8573
|
+
* @param {FlagsPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
8568
8574
|
*
|
|
8569
|
-
* @return {Promise<
|
|
8575
|
+
* @return {Promise<FlagsResponse<StreamChatGenerics>>} Flags Response
|
|
8570
8576
|
*/
|
|
8571
8577
|
|
|
8572
8578
|
}, {
|
|
8573
|
-
key: "
|
|
8579
|
+
key: "_queryFlags",
|
|
8574
8580
|
value: function () {
|
|
8575
|
-
var
|
|
8581
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42() {
|
|
8576
8582
|
var filterConditions,
|
|
8577
8583
|
options,
|
|
8578
8584
|
_args42 = arguments;
|
|
@@ -8583,7 +8589,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8583
8589
|
filterConditions = _args42.length > 0 && _args42[0] !== undefined ? _args42[0] : {};
|
|
8584
8590
|
options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
|
|
8585
8591
|
_context42.next = 4;
|
|
8586
|
-
return this.post(this.baseURL + '/moderation/
|
|
8592
|
+
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
8587
8593
|
filter_conditions: filterConditions
|
|
8588
8594
|
}, options));
|
|
8589
8595
|
|
|
@@ -8598,6 +8604,55 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8598
8604
|
}, _callee42, this);
|
|
8599
8605
|
}));
|
|
8600
8606
|
|
|
8607
|
+
function _queryFlags() {
|
|
8608
|
+
return _queryFlags2.apply(this, arguments);
|
|
8609
|
+
}
|
|
8610
|
+
|
|
8611
|
+
return _queryFlags;
|
|
8612
|
+
}()
|
|
8613
|
+
/**
|
|
8614
|
+
* _queryFlagReports - Query flag reports.
|
|
8615
|
+
*
|
|
8616
|
+
* Note: Do not use this.
|
|
8617
|
+
* It is present for internal usage only.
|
|
8618
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8619
|
+
*
|
|
8620
|
+
* @private
|
|
8621
|
+
* @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
|
|
8622
|
+
* @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
8623
|
+
*
|
|
8624
|
+
* @return {Promise<FlagReportsResponse<StreamChatGenerics>>} Flag Reports Response
|
|
8625
|
+
*/
|
|
8626
|
+
|
|
8627
|
+
}, {
|
|
8628
|
+
key: "_queryFlagReports",
|
|
8629
|
+
value: function () {
|
|
8630
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43() {
|
|
8631
|
+
var filterConditions,
|
|
8632
|
+
options,
|
|
8633
|
+
_args43 = arguments;
|
|
8634
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
8635
|
+
while (1) {
|
|
8636
|
+
switch (_context43.prev = _context43.next) {
|
|
8637
|
+
case 0:
|
|
8638
|
+
filterConditions = _args43.length > 0 && _args43[0] !== undefined ? _args43[0] : {};
|
|
8639
|
+
options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
|
|
8640
|
+
_context43.next = 4;
|
|
8641
|
+
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
8642
|
+
filter_conditions: filterConditions
|
|
8643
|
+
}, options));
|
|
8644
|
+
|
|
8645
|
+
case 4:
|
|
8646
|
+
return _context43.abrupt("return", _context43.sent);
|
|
8647
|
+
|
|
8648
|
+
case 5:
|
|
8649
|
+
case "end":
|
|
8650
|
+
return _context43.stop();
|
|
8651
|
+
}
|
|
8652
|
+
}
|
|
8653
|
+
}, _callee43, this);
|
|
8654
|
+
}));
|
|
8655
|
+
|
|
8601
8656
|
function _queryFlagReports() {
|
|
8602
8657
|
return _queryFlagReports2.apply(this, arguments);
|
|
8603
8658
|
}
|
|
@@ -8622,28 +8677,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8622
8677
|
}, {
|
|
8623
8678
|
key: "_reviewFlagReport",
|
|
8624
8679
|
value: function () {
|
|
8625
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8680
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(id, reviewResult) {
|
|
8626
8681
|
var options,
|
|
8627
|
-
|
|
8628
|
-
return _regeneratorRuntime.wrap(function
|
|
8682
|
+
_args44 = arguments;
|
|
8683
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
8629
8684
|
while (1) {
|
|
8630
|
-
switch (
|
|
8685
|
+
switch (_context44.prev = _context44.next) {
|
|
8631
8686
|
case 0:
|
|
8632
|
-
options =
|
|
8633
|
-
|
|
8687
|
+
options = _args44.length > 2 && _args44[2] !== undefined ? _args44[2] : {};
|
|
8688
|
+
_context44.next = 3;
|
|
8634
8689
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
8635
8690
|
review_result: reviewResult
|
|
8636
8691
|
}, options));
|
|
8637
8692
|
|
|
8638
8693
|
case 3:
|
|
8639
|
-
return
|
|
8694
|
+
return _context44.abrupt("return", _context44.sent);
|
|
8640
8695
|
|
|
8641
8696
|
case 4:
|
|
8642
8697
|
case "end":
|
|
8643
|
-
return
|
|
8698
|
+
return _context44.stop();
|
|
8644
8699
|
}
|
|
8645
8700
|
}
|
|
8646
|
-
},
|
|
8701
|
+
}, _callee44, this);
|
|
8647
8702
|
}));
|
|
8648
8703
|
|
|
8649
8704
|
function _reviewFlagReport(_x54, _x55) {
|
|
@@ -8668,28 +8723,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8668
8723
|
}, {
|
|
8669
8724
|
key: "_unblockMessage",
|
|
8670
8725
|
value: function () {
|
|
8671
|
-
var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8726
|
+
var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetMessageID) {
|
|
8672
8727
|
var options,
|
|
8673
|
-
|
|
8674
|
-
return _regeneratorRuntime.wrap(function
|
|
8728
|
+
_args45 = arguments;
|
|
8729
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
8675
8730
|
while (1) {
|
|
8676
|
-
switch (
|
|
8731
|
+
switch (_context45.prev = _context45.next) {
|
|
8677
8732
|
case 0:
|
|
8678
|
-
options =
|
|
8679
|
-
|
|
8733
|
+
options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
|
|
8734
|
+
_context45.next = 3;
|
|
8680
8735
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
8681
8736
|
target_message_id: targetMessageID
|
|
8682
8737
|
}, options));
|
|
8683
8738
|
|
|
8684
8739
|
case 3:
|
|
8685
|
-
return
|
|
8740
|
+
return _context45.abrupt("return", _context45.sent);
|
|
8686
8741
|
|
|
8687
8742
|
case 4:
|
|
8688
8743
|
case "end":
|
|
8689
|
-
return
|
|
8744
|
+
return _context45.stop();
|
|
8690
8745
|
}
|
|
8691
8746
|
}
|
|
8692
|
-
},
|
|
8747
|
+
}, _callee45, this);
|
|
8693
8748
|
}));
|
|
8694
8749
|
|
|
8695
8750
|
function _unblockMessage(_x56) {
|
|
@@ -8702,7 +8757,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8702
8757
|
* @deprecated use markChannelsRead instead
|
|
8703
8758
|
*
|
|
8704
8759
|
* markAllRead - marks all channels for this user as read
|
|
8705
|
-
* @param {MarkAllReadOptions<
|
|
8760
|
+
* @param {MarkAllReadOptions<StreamChatGenerics>} [data]
|
|
8706
8761
|
*
|
|
8707
8762
|
* @return {Promise<APIResponse>}
|
|
8708
8763
|
*/
|
|
@@ -8714,28 +8769,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8714
8769
|
* markChannelsRead - marks channels read -
|
|
8715
8770
|
* it accepts a map of cid:messageid pairs, if messageid is empty, the whole channel will be marked as read
|
|
8716
8771
|
*
|
|
8717
|
-
* @param {MarkChannelsReadOptions <
|
|
8772
|
+
* @param {MarkChannelsReadOptions <StreamChatGenerics>} [data]
|
|
8718
8773
|
*
|
|
8719
8774
|
* @return {Promise<APIResponse>}
|
|
8720
8775
|
*/
|
|
8721
8776
|
function () {
|
|
8722
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8777
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46() {
|
|
8723
8778
|
var data,
|
|
8724
|
-
|
|
8725
|
-
return _regeneratorRuntime.wrap(function
|
|
8779
|
+
_args46 = arguments;
|
|
8780
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
8726
8781
|
while (1) {
|
|
8727
|
-
switch (
|
|
8782
|
+
switch (_context46.prev = _context46.next) {
|
|
8728
8783
|
case 0:
|
|
8729
|
-
data =
|
|
8730
|
-
|
|
8784
|
+
data = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {};
|
|
8785
|
+
_context46.next = 3;
|
|
8731
8786
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
8732
8787
|
|
|
8733
8788
|
case 3:
|
|
8734
8789
|
case "end":
|
|
8735
|
-
return
|
|
8790
|
+
return _context46.stop();
|
|
8736
8791
|
}
|
|
8737
8792
|
}
|
|
8738
|
-
},
|
|
8793
|
+
}, _callee46, this);
|
|
8739
8794
|
}));
|
|
8740
8795
|
|
|
8741
8796
|
function markChannelsRead() {
|
|
@@ -8804,31 +8859,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8804
8859
|
* @param {string} messageId
|
|
8805
8860
|
* @param {string} language
|
|
8806
8861
|
*
|
|
8807
|
-
* @return {
|
|
8862
|
+
* @return {MessageResponse<StreamChatGenerics>} Response that includes the message
|
|
8808
8863
|
*/
|
|
8809
8864
|
|
|
8810
8865
|
}, {
|
|
8811
8866
|
key: "translateMessage",
|
|
8812
8867
|
value: function () {
|
|
8813
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8814
|
-
return _regeneratorRuntime.wrap(function
|
|
8868
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(messageId, language) {
|
|
8869
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
8815
8870
|
while (1) {
|
|
8816
|
-
switch (
|
|
8871
|
+
switch (_context47.prev = _context47.next) {
|
|
8817
8872
|
case 0:
|
|
8818
|
-
|
|
8873
|
+
_context47.next = 2;
|
|
8819
8874
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
8820
8875
|
language: language
|
|
8821
8876
|
});
|
|
8822
8877
|
|
|
8823
8878
|
case 2:
|
|
8824
|
-
return
|
|
8879
|
+
return _context47.abrupt("return", _context47.sent);
|
|
8825
8880
|
|
|
8826
8881
|
case 3:
|
|
8827
8882
|
case "end":
|
|
8828
|
-
return
|
|
8883
|
+
return _context47.stop();
|
|
8829
8884
|
}
|
|
8830
8885
|
}
|
|
8831
|
-
},
|
|
8886
|
+
}, _callee47, this);
|
|
8832
8887
|
}));
|
|
8833
8888
|
|
|
8834
8889
|
function translateMessage(_x57, _x58) {
|
|
@@ -8923,24 +8978,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8923
8978
|
/**
|
|
8924
8979
|
* updateMessage - Update the given message
|
|
8925
8980
|
*
|
|
8926
|
-
* @param {Omit<MessageResponse<
|
|
8981
|
+
* @param {Omit<MessageResponse<StreamChatGenerics>, 'mentioned_users'> & { mentioned_users?: string[] }} message object, id needs to be specified
|
|
8927
8982
|
* @param {string | { id: string }} [userId]
|
|
8928
8983
|
* @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
|
|
8929
8984
|
*
|
|
8930
|
-
* @return {
|
|
8985
|
+
* @return {{ message: MessageResponse<StreamChatGenerics> }} Response that includes the message
|
|
8931
8986
|
*/
|
|
8932
8987
|
|
|
8933
8988
|
}, {
|
|
8934
8989
|
key: "updateMessage",
|
|
8935
8990
|
value: function () {
|
|
8936
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8991
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(message, userId, options) {
|
|
8937
8992
|
var clonedMessage, reservedMessageFields;
|
|
8938
|
-
return _regeneratorRuntime.wrap(function
|
|
8993
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
8939
8994
|
while (1) {
|
|
8940
|
-
switch (
|
|
8995
|
+
switch (_context48.prev = _context48.next) {
|
|
8941
8996
|
case 0:
|
|
8942
8997
|
if (message.id) {
|
|
8943
|
-
|
|
8998
|
+
_context48.next = 2;
|
|
8944
8999
|
break;
|
|
8945
9000
|
}
|
|
8946
9001
|
|
|
@@ -8977,20 +9032,20 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8977
9032
|
});
|
|
8978
9033
|
}
|
|
8979
9034
|
|
|
8980
|
-
|
|
9035
|
+
_context48.next = 10;
|
|
8981
9036
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
8982
9037
|
message: clonedMessage
|
|
8983
9038
|
}, options));
|
|
8984
9039
|
|
|
8985
9040
|
case 10:
|
|
8986
|
-
return
|
|
9041
|
+
return _context48.abrupt("return", _context48.sent);
|
|
8987
9042
|
|
|
8988
9043
|
case 11:
|
|
8989
9044
|
case "end":
|
|
8990
|
-
return
|
|
9045
|
+
return _context48.stop();
|
|
8991
9046
|
}
|
|
8992
9047
|
}
|
|
8993
|
-
},
|
|
9048
|
+
}, _callee48, this);
|
|
8994
9049
|
}));
|
|
8995
9050
|
|
|
8996
9051
|
function updateMessage(_x59, _x60, _x61) {
|
|
@@ -9004,26 +9059,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9004
9059
|
*
|
|
9005
9060
|
* @param {string} id the message id
|
|
9006
9061
|
*
|
|
9007
|
-
* @param {PartialUpdateMessage<
|
|
9062
|
+
* @param {PartialUpdateMessage<StreamChatGenerics>} partialMessageObject which should contain id and any of "set" or "unset" params;
|
|
9008
9063
|
* example: {id: "user1", set:{text: "hi"}, unset:["color"]}
|
|
9009
9064
|
* @param {string | { id: string }} [userId]
|
|
9010
9065
|
*
|
|
9011
9066
|
* @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
|
|
9012
9067
|
*
|
|
9013
|
-
* @return {
|
|
9068
|
+
* @return {{ message: MessageResponse<StreamChatGenerics> }} Response that includes the updated message
|
|
9014
9069
|
*/
|
|
9015
9070
|
|
|
9016
9071
|
}, {
|
|
9017
9072
|
key: "partialUpdateMessage",
|
|
9018
9073
|
value: function () {
|
|
9019
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9074
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(id, partialMessageObject, userId, options) {
|
|
9020
9075
|
var user;
|
|
9021
|
-
return _regeneratorRuntime.wrap(function
|
|
9076
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
9022
9077
|
while (1) {
|
|
9023
|
-
switch (
|
|
9078
|
+
switch (_context49.prev = _context49.next) {
|
|
9024
9079
|
case 0:
|
|
9025
9080
|
if (id) {
|
|
9026
|
-
|
|
9081
|
+
_context49.next = 2;
|
|
9027
9082
|
break;
|
|
9028
9083
|
}
|
|
9029
9084
|
|
|
@@ -9038,20 +9093,20 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9038
9093
|
};
|
|
9039
9094
|
}
|
|
9040
9095
|
|
|
9041
|
-
|
|
9096
|
+
_context49.next = 6;
|
|
9042
9097
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
9043
9098
|
user: user
|
|
9044
9099
|
}));
|
|
9045
9100
|
|
|
9046
9101
|
case 6:
|
|
9047
|
-
return
|
|
9102
|
+
return _context49.abrupt("return", _context49.sent);
|
|
9048
9103
|
|
|
9049
9104
|
case 7:
|
|
9050
9105
|
case "end":
|
|
9051
|
-
return
|
|
9106
|
+
return _context49.stop();
|
|
9052
9107
|
}
|
|
9053
9108
|
}
|
|
9054
|
-
},
|
|
9109
|
+
}, _callee49, this);
|
|
9055
9110
|
}));
|
|
9056
9111
|
|
|
9057
9112
|
function partialUpdateMessage(_x62, _x63, _x64, _x65) {
|
|
@@ -9063,11 +9118,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9063
9118
|
}, {
|
|
9064
9119
|
key: "deleteMessage",
|
|
9065
9120
|
value: function () {
|
|
9066
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9121
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(messageID, hardDelete) {
|
|
9067
9122
|
var params;
|
|
9068
|
-
return _regeneratorRuntime.wrap(function
|
|
9123
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
9069
9124
|
while (1) {
|
|
9070
|
-
switch (
|
|
9125
|
+
switch (_context50.prev = _context50.next) {
|
|
9071
9126
|
case 0:
|
|
9072
9127
|
params = {};
|
|
9073
9128
|
|
|
@@ -9077,18 +9132,18 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9077
9132
|
};
|
|
9078
9133
|
}
|
|
9079
9134
|
|
|
9080
|
-
|
|
9135
|
+
_context50.next = 4;
|
|
9081
9136
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
9082
9137
|
|
|
9083
9138
|
case 4:
|
|
9084
|
-
return
|
|
9139
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9085
9140
|
|
|
9086
9141
|
case 5:
|
|
9087
9142
|
case "end":
|
|
9088
|
-
return
|
|
9143
|
+
return _context50.stop();
|
|
9089
9144
|
}
|
|
9090
9145
|
}
|
|
9091
|
-
},
|
|
9146
|
+
}, _callee50, this);
|
|
9092
9147
|
}));
|
|
9093
9148
|
|
|
9094
9149
|
function deleteMessage(_x66, _x67) {
|
|
@@ -9100,23 +9155,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9100
9155
|
}, {
|
|
9101
9156
|
key: "getMessage",
|
|
9102
9157
|
value: function () {
|
|
9103
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9104
|
-
return _regeneratorRuntime.wrap(function
|
|
9158
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(messageID) {
|
|
9159
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
9105
9160
|
while (1) {
|
|
9106
|
-
switch (
|
|
9161
|
+
switch (_context51.prev = _context51.next) {
|
|
9107
9162
|
case 0:
|
|
9108
|
-
|
|
9163
|
+
_context51.next = 2;
|
|
9109
9164
|
return this.get(this.baseURL + "/messages/".concat(messageID));
|
|
9110
9165
|
|
|
9111
9166
|
case 2:
|
|
9112
|
-
return
|
|
9167
|
+
return _context51.abrupt("return", _context51.sent);
|
|
9113
9168
|
|
|
9114
9169
|
case 3:
|
|
9115
9170
|
case "end":
|
|
9116
|
-
return
|
|
9171
|
+
return _context51.stop();
|
|
9117
9172
|
}
|
|
9118
9173
|
}
|
|
9119
|
-
},
|
|
9174
|
+
}, _callee51, this);
|
|
9120
9175
|
}));
|
|
9121
9176
|
|
|
9122
9177
|
function getMessage(_x68) {
|
|
@@ -9128,7 +9183,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9128
9183
|
}, {
|
|
9129
9184
|
key: "getUserAgent",
|
|
9130
9185
|
value: function getUserAgent() {
|
|
9131
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "
|
|
9186
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.2.0");
|
|
9132
9187
|
}
|
|
9133
9188
|
}, {
|
|
9134
9189
|
key: "setUserAgent",
|
|
@@ -9323,25 +9378,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9323
9378
|
}, {
|
|
9324
9379
|
key: "sendUserCustomEvent",
|
|
9325
9380
|
value: function () {
|
|
9326
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9327
|
-
return _regeneratorRuntime.wrap(function
|
|
9381
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(targetUserID, event) {
|
|
9382
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
9328
9383
|
while (1) {
|
|
9329
|
-
switch (
|
|
9384
|
+
switch (_context52.prev = _context52.next) {
|
|
9330
9385
|
case 0:
|
|
9331
|
-
|
|
9386
|
+
_context52.next = 2;
|
|
9332
9387
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
9333
9388
|
event: event
|
|
9334
9389
|
});
|
|
9335
9390
|
|
|
9336
9391
|
case 2:
|
|
9337
|
-
return
|
|
9392
|
+
return _context52.abrupt("return", _context52.sent);
|
|
9338
9393
|
|
|
9339
9394
|
case 3:
|
|
9340
9395
|
case "end":
|
|
9341
|
-
return
|
|
9396
|
+
return _context52.stop();
|
|
9342
9397
|
}
|
|
9343
9398
|
}
|
|
9344
|
-
},
|
|
9399
|
+
}, _callee52, this);
|
|
9345
9400
|
}));
|
|
9346
9401
|
|
|
9347
9402
|
function sendUserCustomEvent(_x69, _x70) {
|
|
@@ -9412,29 +9467,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9412
9467
|
}, {
|
|
9413
9468
|
key: "createSegment",
|
|
9414
9469
|
value: function () {
|
|
9415
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9470
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(params) {
|
|
9416
9471
|
var _yield$this$post, segment;
|
|
9417
9472
|
|
|
9418
|
-
return _regeneratorRuntime.wrap(function
|
|
9473
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
9419
9474
|
while (1) {
|
|
9420
|
-
switch (
|
|
9475
|
+
switch (_context53.prev = _context53.next) {
|
|
9421
9476
|
case 0:
|
|
9422
|
-
|
|
9477
|
+
_context53.next = 2;
|
|
9423
9478
|
return this.post(this.baseURL + "/segments", {
|
|
9424
9479
|
segment: params
|
|
9425
9480
|
});
|
|
9426
9481
|
|
|
9427
9482
|
case 2:
|
|
9428
|
-
_yield$this$post =
|
|
9483
|
+
_yield$this$post = _context53.sent;
|
|
9429
9484
|
segment = _yield$this$post.segment;
|
|
9430
|
-
return
|
|
9485
|
+
return _context53.abrupt("return", segment);
|
|
9431
9486
|
|
|
9432
9487
|
case 5:
|
|
9433
9488
|
case "end":
|
|
9434
|
-
return
|
|
9489
|
+
return _context53.stop();
|
|
9435
9490
|
}
|
|
9436
9491
|
}
|
|
9437
|
-
},
|
|
9492
|
+
}, _callee53, this);
|
|
9438
9493
|
}));
|
|
9439
9494
|
|
|
9440
9495
|
function createSegment(_x71) {
|
|
@@ -9454,27 +9509,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9454
9509
|
}, {
|
|
9455
9510
|
key: "getSegment",
|
|
9456
9511
|
value: function () {
|
|
9457
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9512
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(id) {
|
|
9458
9513
|
var _yield$this$get, segment;
|
|
9459
9514
|
|
|
9460
|
-
return _regeneratorRuntime.wrap(function
|
|
9515
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
9461
9516
|
while (1) {
|
|
9462
|
-
switch (
|
|
9517
|
+
switch (_context54.prev = _context54.next) {
|
|
9463
9518
|
case 0:
|
|
9464
|
-
|
|
9519
|
+
_context54.next = 2;
|
|
9465
9520
|
return this.get(this.baseURL + "/segments/".concat(id));
|
|
9466
9521
|
|
|
9467
9522
|
case 2:
|
|
9468
|
-
_yield$this$get =
|
|
9523
|
+
_yield$this$get = _context54.sent;
|
|
9469
9524
|
segment = _yield$this$get.segment;
|
|
9470
|
-
return
|
|
9525
|
+
return _context54.abrupt("return", segment);
|
|
9471
9526
|
|
|
9472
9527
|
case 5:
|
|
9473
9528
|
case "end":
|
|
9474
|
-
return
|
|
9529
|
+
return _context54.stop();
|
|
9475
9530
|
}
|
|
9476
9531
|
}
|
|
9477
|
-
},
|
|
9532
|
+
}, _callee54, this);
|
|
9478
9533
|
}));
|
|
9479
9534
|
|
|
9480
9535
|
function getSegment(_x72) {
|
|
@@ -9493,27 +9548,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9493
9548
|
}, {
|
|
9494
9549
|
key: "listSegments",
|
|
9495
9550
|
value: function () {
|
|
9496
|
-
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9551
|
+
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(options) {
|
|
9497
9552
|
var _yield$this$get2, segments;
|
|
9498
9553
|
|
|
9499
|
-
return _regeneratorRuntime.wrap(function
|
|
9554
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
9500
9555
|
while (1) {
|
|
9501
|
-
switch (
|
|
9556
|
+
switch (_context55.prev = _context55.next) {
|
|
9502
9557
|
case 0:
|
|
9503
|
-
|
|
9558
|
+
_context55.next = 2;
|
|
9504
9559
|
return this.get(this.baseURL + "/segments", options);
|
|
9505
9560
|
|
|
9506
9561
|
case 2:
|
|
9507
|
-
_yield$this$get2 =
|
|
9562
|
+
_yield$this$get2 = _context55.sent;
|
|
9508
9563
|
segments = _yield$this$get2.segments;
|
|
9509
|
-
return
|
|
9564
|
+
return _context55.abrupt("return", segments);
|
|
9510
9565
|
|
|
9511
9566
|
case 5:
|
|
9512
9567
|
case "end":
|
|
9513
|
-
return
|
|
9568
|
+
return _context55.stop();
|
|
9514
9569
|
}
|
|
9515
9570
|
}
|
|
9516
|
-
},
|
|
9571
|
+
}, _callee55, this);
|
|
9517
9572
|
}));
|
|
9518
9573
|
|
|
9519
9574
|
function listSegments(_x73) {
|
|
@@ -9534,29 +9589,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9534
9589
|
}, {
|
|
9535
9590
|
key: "updateSegment",
|
|
9536
9591
|
value: function () {
|
|
9537
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9592
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id, params) {
|
|
9538
9593
|
var _yield$this$put, segment;
|
|
9539
9594
|
|
|
9540
|
-
return _regeneratorRuntime.wrap(function
|
|
9595
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
9541
9596
|
while (1) {
|
|
9542
|
-
switch (
|
|
9597
|
+
switch (_context56.prev = _context56.next) {
|
|
9543
9598
|
case 0:
|
|
9544
|
-
|
|
9599
|
+
_context56.next = 2;
|
|
9545
9600
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
9546
9601
|
segment: params
|
|
9547
9602
|
});
|
|
9548
9603
|
|
|
9549
9604
|
case 2:
|
|
9550
|
-
_yield$this$put =
|
|
9605
|
+
_yield$this$put = _context56.sent;
|
|
9551
9606
|
segment = _yield$this$put.segment;
|
|
9552
|
-
return
|
|
9607
|
+
return _context56.abrupt("return", segment);
|
|
9553
9608
|
|
|
9554
9609
|
case 5:
|
|
9555
9610
|
case "end":
|
|
9556
|
-
return
|
|
9611
|
+
return _context56.stop();
|
|
9557
9612
|
}
|
|
9558
9613
|
}
|
|
9559
|
-
},
|
|
9614
|
+
}, _callee56, this);
|
|
9560
9615
|
}));
|
|
9561
9616
|
|
|
9562
9617
|
function updateSegment(_x74, _x75) {
|
|
@@ -9576,19 +9631,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9576
9631
|
}, {
|
|
9577
9632
|
key: "deleteSegment",
|
|
9578
9633
|
value: function () {
|
|
9579
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9580
|
-
return _regeneratorRuntime.wrap(function
|
|
9634
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id) {
|
|
9635
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
9581
9636
|
while (1) {
|
|
9582
|
-
switch (
|
|
9637
|
+
switch (_context57.prev = _context57.next) {
|
|
9583
9638
|
case 0:
|
|
9584
|
-
return
|
|
9639
|
+
return _context57.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
9585
9640
|
|
|
9586
9641
|
case 1:
|
|
9587
9642
|
case "end":
|
|
9588
|
-
return
|
|
9643
|
+
return _context57.stop();
|
|
9589
9644
|
}
|
|
9590
9645
|
}
|
|
9591
|
-
},
|
|
9646
|
+
}, _callee57, this);
|
|
9592
9647
|
}));
|
|
9593
9648
|
|
|
9594
9649
|
function deleteSegment(_x76) {
|
|
@@ -9608,29 +9663,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9608
9663
|
}, {
|
|
9609
9664
|
key: "createCampaign",
|
|
9610
9665
|
value: function () {
|
|
9611
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9666
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(params) {
|
|
9612
9667
|
var _yield$this$post2, campaign;
|
|
9613
9668
|
|
|
9614
|
-
return _regeneratorRuntime.wrap(function
|
|
9669
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
9615
9670
|
while (1) {
|
|
9616
|
-
switch (
|
|
9671
|
+
switch (_context58.prev = _context58.next) {
|
|
9617
9672
|
case 0:
|
|
9618
|
-
|
|
9673
|
+
_context58.next = 2;
|
|
9619
9674
|
return this.post(this.baseURL + "/campaigns", {
|
|
9620
9675
|
campaign: params
|
|
9621
9676
|
});
|
|
9622
9677
|
|
|
9623
9678
|
case 2:
|
|
9624
|
-
_yield$this$post2 =
|
|
9679
|
+
_yield$this$post2 = _context58.sent;
|
|
9625
9680
|
campaign = _yield$this$post2.campaign;
|
|
9626
|
-
return
|
|
9681
|
+
return _context58.abrupt("return", campaign);
|
|
9627
9682
|
|
|
9628
9683
|
case 5:
|
|
9629
9684
|
case "end":
|
|
9630
|
-
return
|
|
9685
|
+
return _context58.stop();
|
|
9631
9686
|
}
|
|
9632
9687
|
}
|
|
9633
|
-
},
|
|
9688
|
+
}, _callee58, this);
|
|
9634
9689
|
}));
|
|
9635
9690
|
|
|
9636
9691
|
function createCampaign(_x77) {
|
|
@@ -9650,27 +9705,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9650
9705
|
}, {
|
|
9651
9706
|
key: "getCampaign",
|
|
9652
9707
|
value: function () {
|
|
9653
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9708
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(id) {
|
|
9654
9709
|
var _yield$this$get3, campaign;
|
|
9655
9710
|
|
|
9656
|
-
return _regeneratorRuntime.wrap(function
|
|
9711
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
9657
9712
|
while (1) {
|
|
9658
|
-
switch (
|
|
9713
|
+
switch (_context59.prev = _context59.next) {
|
|
9659
9714
|
case 0:
|
|
9660
|
-
|
|
9715
|
+
_context59.next = 2;
|
|
9661
9716
|
return this.get(this.baseURL + "/campaigns/".concat(id));
|
|
9662
9717
|
|
|
9663
9718
|
case 2:
|
|
9664
|
-
_yield$this$get3 =
|
|
9719
|
+
_yield$this$get3 = _context59.sent;
|
|
9665
9720
|
campaign = _yield$this$get3.campaign;
|
|
9666
|
-
return
|
|
9721
|
+
return _context59.abrupt("return", campaign);
|
|
9667
9722
|
|
|
9668
9723
|
case 5:
|
|
9669
9724
|
case "end":
|
|
9670
|
-
return
|
|
9725
|
+
return _context59.stop();
|
|
9671
9726
|
}
|
|
9672
9727
|
}
|
|
9673
|
-
},
|
|
9728
|
+
}, _callee59, this);
|
|
9674
9729
|
}));
|
|
9675
9730
|
|
|
9676
9731
|
function getCampaign(_x78) {
|
|
@@ -9689,27 +9744,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9689
9744
|
}, {
|
|
9690
9745
|
key: "listCampaigns",
|
|
9691
9746
|
value: function () {
|
|
9692
|
-
var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9747
|
+
var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(options) {
|
|
9693
9748
|
var _yield$this$get4, campaigns;
|
|
9694
9749
|
|
|
9695
|
-
return _regeneratorRuntime.wrap(function
|
|
9750
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
9696
9751
|
while (1) {
|
|
9697
|
-
switch (
|
|
9752
|
+
switch (_context60.prev = _context60.next) {
|
|
9698
9753
|
case 0:
|
|
9699
|
-
|
|
9754
|
+
_context60.next = 2;
|
|
9700
9755
|
return this.get(this.baseURL + "/campaigns", options);
|
|
9701
9756
|
|
|
9702
9757
|
case 2:
|
|
9703
|
-
_yield$this$get4 =
|
|
9758
|
+
_yield$this$get4 = _context60.sent;
|
|
9704
9759
|
campaigns = _yield$this$get4.campaigns;
|
|
9705
|
-
return
|
|
9760
|
+
return _context60.abrupt("return", campaigns);
|
|
9706
9761
|
|
|
9707
9762
|
case 5:
|
|
9708
9763
|
case "end":
|
|
9709
|
-
return
|
|
9764
|
+
return _context60.stop();
|
|
9710
9765
|
}
|
|
9711
9766
|
}
|
|
9712
|
-
},
|
|
9767
|
+
}, _callee60, this);
|
|
9713
9768
|
}));
|
|
9714
9769
|
|
|
9715
9770
|
function listCampaigns(_x79) {
|
|
@@ -9730,29 +9785,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9730
9785
|
}, {
|
|
9731
9786
|
key: "updateCampaign",
|
|
9732
9787
|
value: function () {
|
|
9733
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9788
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id, params) {
|
|
9734
9789
|
var _yield$this$put2, campaign;
|
|
9735
9790
|
|
|
9736
|
-
return _regeneratorRuntime.wrap(function
|
|
9791
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
9737
9792
|
while (1) {
|
|
9738
|
-
switch (
|
|
9793
|
+
switch (_context61.prev = _context61.next) {
|
|
9739
9794
|
case 0:
|
|
9740
|
-
|
|
9795
|
+
_context61.next = 2;
|
|
9741
9796
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
9742
9797
|
campaign: params
|
|
9743
9798
|
});
|
|
9744
9799
|
|
|
9745
9800
|
case 2:
|
|
9746
|
-
_yield$this$put2 =
|
|
9801
|
+
_yield$this$put2 = _context61.sent;
|
|
9747
9802
|
campaign = _yield$this$put2.campaign;
|
|
9748
|
-
return
|
|
9803
|
+
return _context61.abrupt("return", campaign);
|
|
9749
9804
|
|
|
9750
9805
|
case 5:
|
|
9751
9806
|
case "end":
|
|
9752
|
-
return
|
|
9807
|
+
return _context61.stop();
|
|
9753
9808
|
}
|
|
9754
9809
|
}
|
|
9755
|
-
},
|
|
9810
|
+
}, _callee61, this);
|
|
9756
9811
|
}));
|
|
9757
9812
|
|
|
9758
9813
|
function updateCampaign(_x80, _x81) {
|
|
@@ -9772,19 +9827,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9772
9827
|
}, {
|
|
9773
9828
|
key: "deleteCampaign",
|
|
9774
9829
|
value: function () {
|
|
9775
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9776
|
-
return _regeneratorRuntime.wrap(function
|
|
9830
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id) {
|
|
9831
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
9777
9832
|
while (1) {
|
|
9778
|
-
switch (
|
|
9833
|
+
switch (_context62.prev = _context62.next) {
|
|
9779
9834
|
case 0:
|
|
9780
|
-
return
|
|
9835
|
+
return _context62.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
9781
9836
|
|
|
9782
9837
|
case 1:
|
|
9783
9838
|
case "end":
|
|
9784
|
-
return
|
|
9839
|
+
return _context62.stop();
|
|
9785
9840
|
}
|
|
9786
9841
|
}
|
|
9787
|
-
},
|
|
9842
|
+
}, _callee62, this);
|
|
9788
9843
|
}));
|
|
9789
9844
|
|
|
9790
9845
|
function deleteCampaign(_x82) {
|
|
@@ -9805,30 +9860,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9805
9860
|
}, {
|
|
9806
9861
|
key: "scheduleCampaign",
|
|
9807
9862
|
value: function () {
|
|
9808
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9863
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id, params) {
|
|
9809
9864
|
var sendAt, _yield$this$patch, campaign;
|
|
9810
9865
|
|
|
9811
|
-
return _regeneratorRuntime.wrap(function
|
|
9866
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
9812
9867
|
while (1) {
|
|
9813
|
-
switch (
|
|
9868
|
+
switch (_context63.prev = _context63.next) {
|
|
9814
9869
|
case 0:
|
|
9815
9870
|
sendAt = params.sendAt;
|
|
9816
|
-
|
|
9871
|
+
_context63.next = 3;
|
|
9817
9872
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
9818
9873
|
send_at: sendAt
|
|
9819
9874
|
});
|
|
9820
9875
|
|
|
9821
9876
|
case 3:
|
|
9822
|
-
_yield$this$patch =
|
|
9877
|
+
_yield$this$patch = _context63.sent;
|
|
9823
9878
|
campaign = _yield$this$patch.campaign;
|
|
9824
|
-
return
|
|
9879
|
+
return _context63.abrupt("return", campaign);
|
|
9825
9880
|
|
|
9826
9881
|
case 6:
|
|
9827
9882
|
case "end":
|
|
9828
|
-
return
|
|
9883
|
+
return _context63.stop();
|
|
9829
9884
|
}
|
|
9830
9885
|
}
|
|
9831
|
-
},
|
|
9886
|
+
}, _callee63, this);
|
|
9832
9887
|
}));
|
|
9833
9888
|
|
|
9834
9889
|
function scheduleCampaign(_x83, _x84) {
|
|
@@ -9848,27 +9903,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9848
9903
|
}, {
|
|
9849
9904
|
key: "stopCampaign",
|
|
9850
9905
|
value: function () {
|
|
9851
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9906
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
|
|
9852
9907
|
var _yield$this$patch2, campaign;
|
|
9853
9908
|
|
|
9854
|
-
return _regeneratorRuntime.wrap(function
|
|
9909
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
9855
9910
|
while (1) {
|
|
9856
|
-
switch (
|
|
9911
|
+
switch (_context64.prev = _context64.next) {
|
|
9857
9912
|
case 0:
|
|
9858
|
-
|
|
9913
|
+
_context64.next = 2;
|
|
9859
9914
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
9860
9915
|
|
|
9861
9916
|
case 2:
|
|
9862
|
-
_yield$this$patch2 =
|
|
9917
|
+
_yield$this$patch2 = _context64.sent;
|
|
9863
9918
|
campaign = _yield$this$patch2.campaign;
|
|
9864
|
-
return
|
|
9919
|
+
return _context64.abrupt("return", campaign);
|
|
9865
9920
|
|
|
9866
9921
|
case 5:
|
|
9867
9922
|
case "end":
|
|
9868
|
-
return
|
|
9923
|
+
return _context64.stop();
|
|
9869
9924
|
}
|
|
9870
9925
|
}
|
|
9871
|
-
},
|
|
9926
|
+
}, _callee64, this);
|
|
9872
9927
|
}));
|
|
9873
9928
|
|
|
9874
9929
|
function stopCampaign(_x85) {
|
|
@@ -9888,27 +9943,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9888
9943
|
}, {
|
|
9889
9944
|
key: "resumeCampaign",
|
|
9890
9945
|
value: function () {
|
|
9891
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9946
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id) {
|
|
9892
9947
|
var _yield$this$patch3, campaign;
|
|
9893
9948
|
|
|
9894
|
-
return _regeneratorRuntime.wrap(function
|
|
9949
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
9895
9950
|
while (1) {
|
|
9896
|
-
switch (
|
|
9951
|
+
switch (_context65.prev = _context65.next) {
|
|
9897
9952
|
case 0:
|
|
9898
|
-
|
|
9953
|
+
_context65.next = 2;
|
|
9899
9954
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
9900
9955
|
|
|
9901
9956
|
case 2:
|
|
9902
|
-
_yield$this$patch3 =
|
|
9957
|
+
_yield$this$patch3 = _context65.sent;
|
|
9903
9958
|
campaign = _yield$this$patch3.campaign;
|
|
9904
|
-
return
|
|
9959
|
+
return _context65.abrupt("return", campaign);
|
|
9905
9960
|
|
|
9906
9961
|
case 5:
|
|
9907
9962
|
case "end":
|
|
9908
|
-
return
|
|
9963
|
+
return _context65.stop();
|
|
9909
9964
|
}
|
|
9910
9965
|
}
|
|
9911
|
-
},
|
|
9966
|
+
}, _callee65, this);
|
|
9912
9967
|
}));
|
|
9913
9968
|
|
|
9914
9969
|
function resumeCampaign(_x86) {
|
|
@@ -9928,30 +9983,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9928
9983
|
}, {
|
|
9929
9984
|
key: "testCampaign",
|
|
9930
9985
|
value: function () {
|
|
9931
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9986
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, params) {
|
|
9932
9987
|
var users, _yield$this$post3, campaign;
|
|
9933
9988
|
|
|
9934
|
-
return _regeneratorRuntime.wrap(function
|
|
9989
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
9935
9990
|
while (1) {
|
|
9936
|
-
switch (
|
|
9991
|
+
switch (_context66.prev = _context66.next) {
|
|
9937
9992
|
case 0:
|
|
9938
9993
|
users = params.users;
|
|
9939
|
-
|
|
9994
|
+
_context66.next = 3;
|
|
9940
9995
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
9941
9996
|
users: users
|
|
9942
9997
|
});
|
|
9943
9998
|
|
|
9944
9999
|
case 3:
|
|
9945
|
-
_yield$this$post3 =
|
|
10000
|
+
_yield$this$post3 = _context66.sent;
|
|
9946
10001
|
campaign = _yield$this$post3.campaign;
|
|
9947
|
-
return
|
|
10002
|
+
return _context66.abrupt("return", campaign);
|
|
9948
10003
|
|
|
9949
10004
|
case 6:
|
|
9950
10005
|
case "end":
|
|
9951
|
-
return
|
|
10006
|
+
return _context66.stop();
|
|
9952
10007
|
}
|
|
9953
10008
|
}
|
|
9954
|
-
},
|
|
10009
|
+
}, _callee66, this);
|
|
9955
10010
|
}));
|
|
9956
10011
|
|
|
9957
10012
|
function testCampaign(_x87, _x88) {
|
|
@@ -9970,21 +10025,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9970
10025
|
}, {
|
|
9971
10026
|
key: "enrichURL",
|
|
9972
10027
|
value: function () {
|
|
9973
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9974
|
-
return _regeneratorRuntime.wrap(function
|
|
10028
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(url) {
|
|
10029
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
9975
10030
|
while (1) {
|
|
9976
|
-
switch (
|
|
10031
|
+
switch (_context67.prev = _context67.next) {
|
|
9977
10032
|
case 0:
|
|
9978
|
-
return
|
|
10033
|
+
return _context67.abrupt("return", this.get(this.baseURL + "/og", {
|
|
9979
10034
|
url: url
|
|
9980
10035
|
}));
|
|
9981
10036
|
|
|
9982
10037
|
case 1:
|
|
9983
10038
|
case "end":
|
|
9984
|
-
return
|
|
10039
|
+
return _context67.stop();
|
|
9985
10040
|
}
|
|
9986
10041
|
}
|
|
9987
|
-
},
|
|
10042
|
+
}, _callee67, this);
|
|
9988
10043
|
}));
|
|
9989
10044
|
|
|
9990
10045
|
function enrichURL(_x89) {
|
|
@@ -10004,19 +10059,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10004
10059
|
}, {
|
|
10005
10060
|
key: "getTask",
|
|
10006
10061
|
value: function () {
|
|
10007
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10008
|
-
return _regeneratorRuntime.wrap(function
|
|
10062
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
|
|
10063
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
10009
10064
|
while (1) {
|
|
10010
|
-
switch (
|
|
10065
|
+
switch (_context68.prev = _context68.next) {
|
|
10011
10066
|
case 0:
|
|
10012
|
-
return
|
|
10067
|
+
return _context68.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
10013
10068
|
|
|
10014
10069
|
case 1:
|
|
10015
10070
|
case "end":
|
|
10016
|
-
return
|
|
10071
|
+
return _context68.stop();
|
|
10017
10072
|
}
|
|
10018
10073
|
}
|
|
10019
|
-
},
|
|
10074
|
+
}, _callee68, this);
|
|
10020
10075
|
}));
|
|
10021
10076
|
|
|
10022
10077
|
function getTask(_x90) {
|
|
@@ -10037,28 +10092,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10037
10092
|
}, {
|
|
10038
10093
|
key: "deleteChannels",
|
|
10039
10094
|
value: function () {
|
|
10040
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10095
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(cids) {
|
|
10041
10096
|
var options,
|
|
10042
|
-
|
|
10043
|
-
return _regeneratorRuntime.wrap(function
|
|
10097
|
+
_args69 = arguments;
|
|
10098
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
10044
10099
|
while (1) {
|
|
10045
|
-
switch (
|
|
10100
|
+
switch (_context69.prev = _context69.next) {
|
|
10046
10101
|
case 0:
|
|
10047
|
-
options =
|
|
10048
|
-
|
|
10102
|
+
options = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
|
|
10103
|
+
_context69.next = 3;
|
|
10049
10104
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
10050
10105
|
cids: cids
|
|
10051
10106
|
}, options));
|
|
10052
10107
|
|
|
10053
10108
|
case 3:
|
|
10054
|
-
return
|
|
10109
|
+
return _context69.abrupt("return", _context69.sent);
|
|
10055
10110
|
|
|
10056
10111
|
case 4:
|
|
10057
10112
|
case "end":
|
|
10058
|
-
return
|
|
10113
|
+
return _context69.stop();
|
|
10059
10114
|
}
|
|
10060
10115
|
}
|
|
10061
|
-
},
|
|
10116
|
+
}, _callee69, this);
|
|
10062
10117
|
}));
|
|
10063
10118
|
|
|
10064
10119
|
function deleteChannels(_x91) {
|
|
@@ -10079,13 +10134,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10079
10134
|
}, {
|
|
10080
10135
|
key: "deleteUsers",
|
|
10081
10136
|
value: function () {
|
|
10082
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10083
|
-
return _regeneratorRuntime.wrap(function
|
|
10137
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(user_ids, options) {
|
|
10138
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
10084
10139
|
while (1) {
|
|
10085
|
-
switch (
|
|
10140
|
+
switch (_context70.prev = _context70.next) {
|
|
10086
10141
|
case 0:
|
|
10087
10142
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
10088
|
-
|
|
10143
|
+
_context70.next = 2;
|
|
10089
10144
|
break;
|
|
10090
10145
|
}
|
|
10091
10146
|
|
|
@@ -10093,7 +10148,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10093
10148
|
|
|
10094
10149
|
case 2:
|
|
10095
10150
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
10096
|
-
|
|
10151
|
+
_context70.next = 4;
|
|
10097
10152
|
break;
|
|
10098
10153
|
}
|
|
10099
10154
|
|
|
@@ -10101,27 +10156,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10101
10156
|
|
|
10102
10157
|
case 4:
|
|
10103
10158
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
10104
|
-
|
|
10159
|
+
_context70.next = 6;
|
|
10105
10160
|
break;
|
|
10106
10161
|
}
|
|
10107
10162
|
|
|
10108
10163
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
10109
10164
|
|
|
10110
10165
|
case 6:
|
|
10111
|
-
|
|
10166
|
+
_context70.next = 8;
|
|
10112
10167
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
10113
10168
|
user_ids: user_ids
|
|
10114
10169
|
}, options));
|
|
10115
10170
|
|
|
10116
10171
|
case 8:
|
|
10117
|
-
return
|
|
10172
|
+
return _context70.abrupt("return", _context70.sent);
|
|
10118
10173
|
|
|
10119
10174
|
case 9:
|
|
10120
10175
|
case "end":
|
|
10121
|
-
return
|
|
10176
|
+
return _context70.stop();
|
|
10122
10177
|
}
|
|
10123
10178
|
}
|
|
10124
|
-
},
|
|
10179
|
+
}, _callee70, this);
|
|
10125
10180
|
}));
|
|
10126
10181
|
|
|
10127
10182
|
function deleteUsers(_x92, _x93) {
|
|
@@ -10131,7 +10186,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10131
10186
|
return deleteUsers;
|
|
10132
10187
|
}()
|
|
10133
10188
|
/**
|
|
10134
|
-
*
|
|
10189
|
+
* _createImportURL - Create an Import upload url.
|
|
10135
10190
|
*
|
|
10136
10191
|
* Note: Do not use this.
|
|
10137
10192
|
* It is present for internal usage only.
|
|
@@ -10143,31 +10198,74 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10143
10198
|
* @return {APIResponse & CreateImportResponse} An ImportTask
|
|
10144
10199
|
*/
|
|
10145
10200
|
|
|
10201
|
+
}, {
|
|
10202
|
+
key: "_createImportURL",
|
|
10203
|
+
value: function () {
|
|
10204
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filename) {
|
|
10205
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
10206
|
+
while (1) {
|
|
10207
|
+
switch (_context71.prev = _context71.next) {
|
|
10208
|
+
case 0:
|
|
10209
|
+
_context71.next = 2;
|
|
10210
|
+
return this.post(this.baseURL + "/import_urls", {
|
|
10211
|
+
filename: filename
|
|
10212
|
+
});
|
|
10213
|
+
|
|
10214
|
+
case 2:
|
|
10215
|
+
return _context71.abrupt("return", _context71.sent);
|
|
10216
|
+
|
|
10217
|
+
case 3:
|
|
10218
|
+
case "end":
|
|
10219
|
+
return _context71.stop();
|
|
10220
|
+
}
|
|
10221
|
+
}
|
|
10222
|
+
}, _callee71, this);
|
|
10223
|
+
}));
|
|
10224
|
+
|
|
10225
|
+
function _createImportURL(_x94) {
|
|
10226
|
+
return _createImportURL2.apply(this, arguments);
|
|
10227
|
+
}
|
|
10228
|
+
|
|
10229
|
+
return _createImportURL;
|
|
10230
|
+
}()
|
|
10231
|
+
/**
|
|
10232
|
+
* _createImport - Create an Import Task.
|
|
10233
|
+
*
|
|
10234
|
+
* Note: Do not use this.
|
|
10235
|
+
* It is present for internal usage only.
|
|
10236
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
10237
|
+
*
|
|
10238
|
+
* @private
|
|
10239
|
+
* @param {string} path path of uploaded data
|
|
10240
|
+
*
|
|
10241
|
+
* @return {APIResponse & CreateImportResponse} An ImportTask
|
|
10242
|
+
*/
|
|
10243
|
+
|
|
10146
10244
|
}, {
|
|
10147
10245
|
key: "_createImport",
|
|
10148
10246
|
value: function () {
|
|
10149
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10150
|
-
return _regeneratorRuntime.wrap(function
|
|
10247
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(path) {
|
|
10248
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10151
10249
|
while (1) {
|
|
10152
|
-
switch (
|
|
10250
|
+
switch (_context72.prev = _context72.next) {
|
|
10153
10251
|
case 0:
|
|
10154
|
-
|
|
10252
|
+
_context72.next = 2;
|
|
10155
10253
|
return this.post(this.baseURL + "/imports", {
|
|
10156
|
-
|
|
10254
|
+
path: path
|
|
10157
10255
|
});
|
|
10158
10256
|
|
|
10159
10257
|
case 2:
|
|
10160
|
-
return
|
|
10258
|
+
return _context72.abrupt("return", _context72.sent);
|
|
10161
10259
|
|
|
10162
10260
|
case 3:
|
|
10163
10261
|
case "end":
|
|
10164
|
-
return
|
|
10262
|
+
return _context72.stop();
|
|
10165
10263
|
}
|
|
10166
10264
|
}
|
|
10167
|
-
},
|
|
10265
|
+
}, _callee72, this);
|
|
10168
10266
|
}));
|
|
10169
10267
|
|
|
10170
|
-
function _createImport(
|
|
10268
|
+
function _createImport(_x95) {
|
|
10171
10269
|
return _createImport2.apply(this, arguments);
|
|
10172
10270
|
}
|
|
10173
10271
|
|
|
@@ -10189,26 +10287,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10189
10287
|
}, {
|
|
10190
10288
|
key: "_getImport",
|
|
10191
10289
|
value: function () {
|
|
10192
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10193
|
-
return _regeneratorRuntime.wrap(function
|
|
10290
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
|
|
10291
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
10194
10292
|
while (1) {
|
|
10195
|
-
switch (
|
|
10293
|
+
switch (_context73.prev = _context73.next) {
|
|
10196
10294
|
case 0:
|
|
10197
|
-
|
|
10295
|
+
_context73.next = 2;
|
|
10198
10296
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
10199
10297
|
|
|
10200
10298
|
case 2:
|
|
10201
|
-
return
|
|
10299
|
+
return _context73.abrupt("return", _context73.sent);
|
|
10202
10300
|
|
|
10203
10301
|
case 3:
|
|
10204
10302
|
case "end":
|
|
10205
|
-
return
|
|
10303
|
+
return _context73.stop();
|
|
10206
10304
|
}
|
|
10207
10305
|
}
|
|
10208
|
-
},
|
|
10306
|
+
}, _callee73, this);
|
|
10209
10307
|
}));
|
|
10210
10308
|
|
|
10211
|
-
function _getImport(
|
|
10309
|
+
function _getImport(_x96) {
|
|
10212
10310
|
return _getImport2.apply(this, arguments);
|
|
10213
10311
|
}
|
|
10214
10312
|
|
|
@@ -10230,26 +10328,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10230
10328
|
}, {
|
|
10231
10329
|
key: "_listImports",
|
|
10232
10330
|
value: function () {
|
|
10233
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10234
|
-
return _regeneratorRuntime.wrap(function
|
|
10331
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(options) {
|
|
10332
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
10235
10333
|
while (1) {
|
|
10236
|
-
switch (
|
|
10334
|
+
switch (_context74.prev = _context74.next) {
|
|
10237
10335
|
case 0:
|
|
10238
|
-
|
|
10336
|
+
_context74.next = 2;
|
|
10239
10337
|
return this.get(this.baseURL + "/imports", options);
|
|
10240
10338
|
|
|
10241
10339
|
case 2:
|
|
10242
|
-
return
|
|
10340
|
+
return _context74.abrupt("return", _context74.sent);
|
|
10243
10341
|
|
|
10244
10342
|
case 3:
|
|
10245
10343
|
case "end":
|
|
10246
|
-
return
|
|
10344
|
+
return _context74.stop();
|
|
10247
10345
|
}
|
|
10248
10346
|
}
|
|
10249
|
-
},
|
|
10347
|
+
}, _callee74, this);
|
|
10250
10348
|
}));
|
|
10251
10349
|
|
|
10252
|
-
function _listImports(
|
|
10350
|
+
function _listImports(_x97) {
|
|
10253
10351
|
return _listImports2.apply(this, arguments);
|
|
10254
10352
|
}
|
|
10255
10353
|
|