@stream-io/feeds-client 0.2.18 → 0.2.19
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/CHANGELOG.md +16 -0
- package/dist/cjs/index.js +94 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-bindings.js +26 -55
- package/dist/cjs/react-bindings.js.map +1 -1
- package/dist/es/index.mjs +86 -17
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/react-bindings.mjs +19 -48
- package/dist/es/react-bindings.mjs.map +1 -1
- package/dist/{index--koeDtxd.js → feeds-client-C09giTf1.js} +177 -79
- package/dist/feeds-client-C09giTf1.js.map +1 -0
- package/dist/{index-Zde8UE5f.mjs → feeds-client-CFadXO-B.mjs} +190 -92
- package/dist/feeds-client-CFadXO-B.mjs.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.d.ts +2 -32
- package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.d.ts.map +1 -1
- package/dist/types/common/real-time/event-models.d.ts +7 -2
- package/dist/types/common/real-time/event-models.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +1 -0
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/activity/handle-activity-added.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/activity/handle-activity-updated.d.ts.map +1 -1
- package/dist/types/feed/feed.d.ts +1 -1
- package/dist/types/feed/feed.d.ts.map +1 -1
- package/dist/types/feeds-client/feeds-client.d.ts +9 -1
- package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
- package/dist/types/utils/throttling/index.d.ts +3 -0
- package/dist/types/utils/throttling/index.d.ts.map +1 -0
- package/dist/types/utils/throttling/throttle.d.ts +34 -0
- package/dist/types/utils/throttling/throttle.d.ts.map +1 -0
- package/dist/types/utils/throttling/throttled-get-batched-own-capabilities.d.ts +14 -0
- package/dist/types/utils/throttling/throttled-get-batched-own-capabilities.d.ts.map +1 -0
- package/package.json +7 -3
- package/react-bindings.d.ts +11 -0
- package/react-bindings.js +7 -0
- package/react-bindings.mjs +11 -0
- package/src/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.ts +21 -73
- package/src/common/real-time/event-models.ts +8 -2
- package/src/common/types.ts +1 -0
- package/src/feed/event-handlers/activity/handle-activity-added.ts +9 -1
- package/src/feed/event-handlers/activity/handle-activity-updated.ts +4 -0
- package/src/feed/feed.ts +18 -3
- package/src/feeds-client/feeds-client.ts +106 -3
- package/src/utils/throttling/index.ts +2 -0
- package/src/utils/throttling/throttle.ts +123 -0
- package/src/utils/throttling/throttled-get-batched-own-capabilities.ts +42 -0
- package/dist/index--koeDtxd.js.map +0 -1
- package/dist/index-Zde8UE5f.mjs.map +0 -1
- package/src/feed/event-handlers/activity/activity-marked-utils.test.ts +0 -208
- package/src/feed/event-handlers/activity/activity-reaction-utils.test.ts +0 -371
- package/src/feed/event-handlers/activity/handle-activity-added.test.ts +0 -97
- package/src/feed/event-handlers/activity/handle-activity-deleted.test.ts +0 -117
- package/src/feed/event-handlers/activity/handle-activity-pinned.test.ts +0 -60
- package/src/feed/event-handlers/activity/handle-activity-reaction-added.test.ts +0 -257
- package/src/feed/event-handlers/activity/handle-activity-reaction-deleted.test.ts +0 -317
- package/src/feed/event-handlers/activity/handle-activity-reaction-updated.test.ts +0 -282
- package/src/feed/event-handlers/activity/handle-activity-unpinned.test.ts +0 -95
- package/src/feed/event-handlers/activity/handle-activity-updated.test.ts +0 -245
- package/src/feed/event-handlers/add-aggregated-activities-to-state.test.ts +0 -510
- package/src/feed/event-handlers/bookmark/bookmark-utils.test.ts +0 -521
- package/src/feed/event-handlers/bookmark/handle-bookmark-added.test.ts +0 -178
- package/src/feed/event-handlers/bookmark/handle-bookmark-deleted.test.ts +0 -188
- package/src/feed/event-handlers/bookmark/handle-bookmark-updated.test.ts +0 -196
- package/src/feed/event-handlers/comment/handle-comment-added.test.ts +0 -271
- package/src/feed/event-handlers/comment/handle-comment-deleted.test.ts +0 -255
- package/src/feed/event-handlers/comment/handle-comment-reaction-added.test.ts +0 -329
- package/src/feed/event-handlers/comment/handle-comment-reaction-deleted.test.ts +0 -343
- package/src/feed/event-handlers/comment/handle-comment-reaction-updated.test.ts +0 -350
- package/src/feed/event-handlers/comment/handle-comment-updated.test.ts +0 -267
- package/src/feed/event-handlers/comment/utils/update-comment-count.test.ts +0 -322
- package/src/feed/event-handlers/feed-member/handle-feed-member-added.test.ts +0 -75
- package/src/feed/event-handlers/feed-member/handle-feed-member-removed.test.ts +0 -82
- package/src/feed/event-handlers/feed-member/handle-feed-member-updated.test.ts +0 -84
- package/src/feed/event-handlers/follow/follow-state-update-queue.test.ts +0 -219
- package/src/feed/event-handlers/follow/handle-follow-created.test.ts +0 -250
- package/src/feed/event-handlers/follow/handle-follow-deleted.test.ts +0 -268
- package/src/feed/event-handlers/follow/handle-follow-updated.test.ts +0 -131
- package/src/feed/event-handlers/notification-feed/handle-notification-feed-updated.test.ts +0 -182
- package/src/feed/event-handlers/story-feeds/handle-story-feeds-updated.test.ts +0 -45
- package/src/feed/feed.test.ts +0 -90
- package/src/feeds-client/event-handlers/user/handle-user-updated.test.ts +0 -53
- package/src/utils/event-triggered-by-connected-user.test.ts +0 -73
- package/src/utils/state-update-queue.test.ts +0 -129
- package/src/utils/unique-array-merge.test.ts +0 -179
|
@@ -3730,7 +3730,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
|
|
|
3730
3730
|
};
|
|
3731
3731
|
return result;
|
|
3732
3732
|
};
|
|
3733
|
-
const version = "0.2.
|
|
3733
|
+
const version = "0.2.19";
|
|
3734
3734
|
class ApiClient {
|
|
3735
3735
|
constructor(apiKey, tokenManager, connectionIdManager, options) {
|
|
3736
3736
|
this.apiKey = apiKey;
|
|
@@ -5330,7 +5330,12 @@ function handleActivityAdded(event) {
|
|
|
5330
5330
|
this.currentState.addNewActivitiesTo
|
|
5331
5331
|
);
|
|
5332
5332
|
if (result.changed) {
|
|
5333
|
-
|
|
5333
|
+
const activity = event.activity;
|
|
5334
|
+
this.client.hydratePollCache([activity]);
|
|
5335
|
+
const currentFeed = activity.current_feed;
|
|
5336
|
+
if (currentFeed) {
|
|
5337
|
+
this.client.hydrateCapabilitiesCache([currentFeed]);
|
|
5338
|
+
}
|
|
5334
5339
|
this.state.partialNext({ activities: result.activities });
|
|
5335
5340
|
}
|
|
5336
5341
|
}
|
|
@@ -5442,6 +5447,9 @@ function handleActivityUpdated(payload, fromWs) {
|
|
|
5442
5447
|
];
|
|
5443
5448
|
if (result1?.changed || result2.changed) {
|
|
5444
5449
|
this.client.hydratePollCache([payload.activity]);
|
|
5450
|
+
if (payload.activity.current_feed) {
|
|
5451
|
+
this.client.hydrateCapabilitiesCache([payload.activity.current_feed]);
|
|
5452
|
+
}
|
|
5445
5453
|
this.state.partialNext({
|
|
5446
5454
|
activities: result1?.changed ? result1.entities : currentActivities,
|
|
5447
5455
|
pinned_activities: result2.entities
|
|
@@ -6066,6 +6074,13 @@ const _Feed = class _Feed extends FeedApi {
|
|
|
6066
6074
|
});
|
|
6067
6075
|
try {
|
|
6068
6076
|
const response = await super.getOrCreate(request);
|
|
6077
|
+
const currentActivityFeeds = [];
|
|
6078
|
+
for (const activity of response.activities) {
|
|
6079
|
+
if (activity.current_feed) {
|
|
6080
|
+
currentActivityFeeds.push(activity.current_feed);
|
|
6081
|
+
}
|
|
6082
|
+
}
|
|
6083
|
+
this.client.hydrateCapabilitiesCache([response.feed, ...currentActivityFeeds]);
|
|
6069
6084
|
if (request?.next) {
|
|
6070
6085
|
const { activities: currentActivities = [] } = this.currentState;
|
|
6071
6086
|
const result = addActivitiesToState.bind(this)(
|
|
@@ -6475,11 +6490,16 @@ const _Feed = class _Feed extends FeedApi {
|
|
|
6475
6490
|
limit: currentState.last_get_or_create_request_config?.limit ?? 20
|
|
6476
6491
|
});
|
|
6477
6492
|
}
|
|
6478
|
-
addActivity(request) {
|
|
6479
|
-
|
|
6493
|
+
async addActivity(request) {
|
|
6494
|
+
const response = await this.client.addActivity({
|
|
6480
6495
|
...request,
|
|
6481
6496
|
feeds: [this.feed]
|
|
6482
6497
|
});
|
|
6498
|
+
const currentFeed = response.activity.current_feed;
|
|
6499
|
+
if (currentFeed) {
|
|
6500
|
+
this.client.hydrateCapabilitiesCache([currentFeed]);
|
|
6501
|
+
}
|
|
6502
|
+
return response;
|
|
6483
6503
|
}
|
|
6484
6504
|
handleWSEvent(event) {
|
|
6485
6505
|
const eventHandler = this.eventHandlers[event.type];
|
|
@@ -6513,6 +6533,7 @@ function handleUserUpdated(event) {
|
|
|
6513
6533
|
}
|
|
6514
6534
|
var UnhandledErrorType = /* @__PURE__ */ ((UnhandledErrorType2) => {
|
|
6515
6535
|
UnhandledErrorType2["ReconnectionReconciliation"] = "reconnection-reconciliation";
|
|
6536
|
+
UnhandledErrorType2["FetchingOwnCapabilitiesOnNewActivity"] = "fetching-own-capabilities-on-new-activity";
|
|
6516
6537
|
return UnhandledErrorType2;
|
|
6517
6538
|
})(UnhandledErrorType || {});
|
|
6518
6539
|
function updateCommentCount({
|
|
@@ -6543,6 +6564,90 @@ function updateCommentCount({
|
|
|
6543
6564
|
}, false);
|
|
6544
6565
|
}
|
|
6545
6566
|
}
|
|
6567
|
+
const throttle = (fn, timeout = 200, {
|
|
6568
|
+
leading = true,
|
|
6569
|
+
trailing = false
|
|
6570
|
+
} = {}) => {
|
|
6571
|
+
let timer = null;
|
|
6572
|
+
let storedArgs = null;
|
|
6573
|
+
let storedThis = null;
|
|
6574
|
+
let lastInvokeTime;
|
|
6575
|
+
const invoke = (args, thisArg) => {
|
|
6576
|
+
lastInvokeTime = Date.now();
|
|
6577
|
+
fn.apply(thisArg, args);
|
|
6578
|
+
};
|
|
6579
|
+
const scheduleTrailing = (delay) => {
|
|
6580
|
+
if (timer) return;
|
|
6581
|
+
timer = setTimeout(() => {
|
|
6582
|
+
timer = null;
|
|
6583
|
+
if (trailing && storedArgs) {
|
|
6584
|
+
invoke(storedArgs, storedThis);
|
|
6585
|
+
storedArgs = null;
|
|
6586
|
+
storedThis = null;
|
|
6587
|
+
}
|
|
6588
|
+
}, delay);
|
|
6589
|
+
};
|
|
6590
|
+
return {
|
|
6591
|
+
throttledFn: function(...args) {
|
|
6592
|
+
const now = Date.now();
|
|
6593
|
+
const hasBeenInvoked = lastInvokeTime != null;
|
|
6594
|
+
if (!hasBeenInvoked && !leading) lastInvokeTime = now;
|
|
6595
|
+
const timeSinceLast = hasBeenInvoked ? now - lastInvokeTime : timeout;
|
|
6596
|
+
const remaining = timeout - timeSinceLast;
|
|
6597
|
+
if (trailing) {
|
|
6598
|
+
storedArgs = args;
|
|
6599
|
+
storedThis = this;
|
|
6600
|
+
}
|
|
6601
|
+
if (remaining <= 0) {
|
|
6602
|
+
if (timer) {
|
|
6603
|
+
clearTimeout(timer);
|
|
6604
|
+
timer = null;
|
|
6605
|
+
}
|
|
6606
|
+
if (leading) {
|
|
6607
|
+
if (trailing) {
|
|
6608
|
+
if (storedArgs === args) {
|
|
6609
|
+
storedArgs = null;
|
|
6610
|
+
storedThis = null;
|
|
6611
|
+
}
|
|
6612
|
+
}
|
|
6613
|
+
invoke(args, this);
|
|
6614
|
+
} else {
|
|
6615
|
+
if (trailing) scheduleTrailing(timeout);
|
|
6616
|
+
}
|
|
6617
|
+
return;
|
|
6618
|
+
}
|
|
6619
|
+
if (trailing && !timer) {
|
|
6620
|
+
scheduleTrailing(remaining);
|
|
6621
|
+
}
|
|
6622
|
+
},
|
|
6623
|
+
cancelTimer: () => {
|
|
6624
|
+
if (timer) {
|
|
6625
|
+
clearTimeout(timer);
|
|
6626
|
+
timer = null;
|
|
6627
|
+
}
|
|
6628
|
+
}
|
|
6629
|
+
};
|
|
6630
|
+
};
|
|
6631
|
+
const DEFAULT_BATCH_OWN_CAPABILITIES_THROTTLING_INTERVAL = 2e3;
|
|
6632
|
+
const queuedFeeds = /* @__PURE__ */ new Set();
|
|
6633
|
+
function queueBatchedOwnCapabilities({ feeds }) {
|
|
6634
|
+
for (const feed of feeds) {
|
|
6635
|
+
queuedFeeds.add(feed);
|
|
6636
|
+
}
|
|
6637
|
+
if (queuedFeeds.size > 0) {
|
|
6638
|
+
this.throttledGetBatchOwnCapabilities(
|
|
6639
|
+
[...queuedFeeds],
|
|
6640
|
+
(feedsToClear) => {
|
|
6641
|
+
for (const feed of feedsToClear) {
|
|
6642
|
+
queuedFeeds.delete(feed);
|
|
6643
|
+
}
|
|
6644
|
+
}
|
|
6645
|
+
);
|
|
6646
|
+
}
|
|
6647
|
+
}
|
|
6648
|
+
function clearQueuedFeeds() {
|
|
6649
|
+
queuedFeeds.clear();
|
|
6650
|
+
}
|
|
6546
6651
|
class FeedsClient extends FeedsApi {
|
|
6547
6652
|
constructor(apiKey, options) {
|
|
6548
6653
|
const tokenManager = new TokenManager();
|
|
@@ -6557,6 +6662,29 @@ class FeedsClient extends FeedsApi {
|
|
|
6557
6662
|
this.eventDispatcher = new EventDispatcher();
|
|
6558
6663
|
this.activeFeeds = {};
|
|
6559
6664
|
this.healthyConnectionChangedEventCount = 0;
|
|
6665
|
+
this.setGetBatchOwnCapabilitiesThrottlingInterval = (throttlingMs) => {
|
|
6666
|
+
const {
|
|
6667
|
+
throttledFn: throttledGetBatchOwnCapabilities,
|
|
6668
|
+
cancelTimer: cancel
|
|
6669
|
+
} = throttle(
|
|
6670
|
+
(feeds, callback) => {
|
|
6671
|
+
this.ownCapabilitiesBatch({
|
|
6672
|
+
feeds
|
|
6673
|
+
}).catch((error) => {
|
|
6674
|
+
this.eventDispatcher.dispatch({
|
|
6675
|
+
type: "errors.unhandled",
|
|
6676
|
+
error_type: UnhandledErrorType.FetchingOwnCapabilitiesOnNewActivity,
|
|
6677
|
+
error
|
|
6678
|
+
});
|
|
6679
|
+
});
|
|
6680
|
+
callback(feeds);
|
|
6681
|
+
},
|
|
6682
|
+
throttlingMs,
|
|
6683
|
+
{ trailing: true }
|
|
6684
|
+
);
|
|
6685
|
+
this.throttledGetBatchOwnCapabilities = throttledGetBatchOwnCapabilities;
|
|
6686
|
+
this.cancelGetBatchOwnCapabilitiesTimer = cancel;
|
|
6687
|
+
};
|
|
6560
6688
|
this.recoverOnReconnect = async () => {
|
|
6561
6689
|
this.healthyConnectionChangedEventCount++;
|
|
6562
6690
|
if (this.healthyConnectionChangedEventCount > 1) {
|
|
@@ -6580,6 +6708,9 @@ class FeedsClient extends FeedsApi {
|
|
|
6580
6708
|
throw new Error(`Can't connect a new user, call "disconnectUser" first`);
|
|
6581
6709
|
}
|
|
6582
6710
|
this.tokenManager.setTokenOrProvider(tokenProvider);
|
|
6711
|
+
this.setGetBatchOwnCapabilitiesThrottlingInterval(
|
|
6712
|
+
this.query_batch_own_capabilties_throttling_interval
|
|
6713
|
+
);
|
|
6583
6714
|
try {
|
|
6584
6715
|
addConnectionEventListeners(this.updateNetworkConnectionStatus);
|
|
6585
6716
|
this.wsConnection = new StableWSConnection(
|
|
@@ -6746,10 +6877,14 @@ class FeedsClient extends FeedsApi {
|
|
|
6746
6877
|
removeConnectionEventListeners(this.updateNetworkConnectionStatus);
|
|
6747
6878
|
this.connectionIdManager.reset();
|
|
6748
6879
|
this.tokenManager.reset();
|
|
6880
|
+
this.polls_by_id.clear();
|
|
6749
6881
|
this.state.partialNext({
|
|
6750
6882
|
connected_user: void 0,
|
|
6751
|
-
is_ws_connection_healthy: false
|
|
6883
|
+
is_ws_connection_healthy: false,
|
|
6884
|
+
own_capabilities_by_fid: {}
|
|
6752
6885
|
});
|
|
6886
|
+
this.cancelGetBatchOwnCapabilitiesTimer();
|
|
6887
|
+
clearQueuedFeeds();
|
|
6753
6888
|
};
|
|
6754
6889
|
this.on = this.eventDispatcher.on;
|
|
6755
6890
|
this.off = this.eventDispatcher.off;
|
|
@@ -6790,12 +6925,14 @@ class FeedsClient extends FeedsApi {
|
|
|
6790
6925
|
};
|
|
6791
6926
|
this.state = new StateStore({
|
|
6792
6927
|
connected_user: void 0,
|
|
6793
|
-
is_ws_connection_healthy: false
|
|
6928
|
+
is_ws_connection_healthy: false,
|
|
6929
|
+
own_capabilities_by_fid: {}
|
|
6794
6930
|
});
|
|
6795
6931
|
this.moderation = new ModerationClient(apiClient);
|
|
6796
6932
|
this.tokenManager = tokenManager;
|
|
6797
6933
|
this.connectionIdManager = connectionIdManager;
|
|
6798
6934
|
this.polls_by_id = /* @__PURE__ */ new Map();
|
|
6935
|
+
this.query_batch_own_capabilties_throttling_interval = options?.query_batch_own_capabilties_throttling_interval ?? DEFAULT_BATCH_OWN_CAPABILITIES_THROTTLING_INTERVAL;
|
|
6799
6936
|
configureLoggers(options?.configure_loggers_options);
|
|
6800
6937
|
this.on("all", (event) => {
|
|
6801
6938
|
const fid = event.fid;
|
|
@@ -6915,9 +7052,29 @@ class FeedsClient extends FeedsApi {
|
|
|
6915
7052
|
}
|
|
6916
7053
|
}
|
|
6917
7054
|
}
|
|
7055
|
+
hydrateCapabilitiesCache(feedResponses) {
|
|
7056
|
+
let ownCapabilitiesCache = this.state.getLatestValue().own_capabilities_by_fid;
|
|
7057
|
+
const capabilitiesToFetchQueue = [];
|
|
7058
|
+
for (const feedResponse of feedResponses) {
|
|
7059
|
+
const { feed, own_capabilities } = feedResponse;
|
|
7060
|
+
if (!Object.prototype.hasOwnProperty.call(ownCapabilitiesCache, feed)) {
|
|
7061
|
+
if (own_capabilities) {
|
|
7062
|
+
ownCapabilitiesCache = {
|
|
7063
|
+
...ownCapabilitiesCache,
|
|
7064
|
+
[feed]: own_capabilities
|
|
7065
|
+
};
|
|
7066
|
+
} else {
|
|
7067
|
+
capabilitiesToFetchQueue.push(feed);
|
|
7068
|
+
}
|
|
7069
|
+
}
|
|
7070
|
+
}
|
|
7071
|
+
queueBatchedOwnCapabilities.bind(this)({ feeds: capabilitiesToFetchQueue });
|
|
7072
|
+
this.state.partialNext({ own_capabilities_by_fid: ownCapabilitiesCache });
|
|
7073
|
+
}
|
|
6918
7074
|
async queryFeeds(request) {
|
|
6919
7075
|
const response = await this._queryFeeds(request);
|
|
6920
|
-
const
|
|
7076
|
+
const feedResponses = response.feeds;
|
|
7077
|
+
const feeds = feedResponses.map(
|
|
6921
7078
|
(feedResponse) => this.getOrCreateActiveFeed(
|
|
6922
7079
|
feedResponse.group_id,
|
|
6923
7080
|
feedResponse.id,
|
|
@@ -6925,6 +7082,7 @@ class FeedsClient extends FeedsApi {
|
|
|
6925
7082
|
request?.watch
|
|
6926
7083
|
)
|
|
6927
7084
|
);
|
|
7085
|
+
this.hydrateCapabilitiesCache(feedResponses);
|
|
6928
7086
|
return {
|
|
6929
7087
|
feeds,
|
|
6930
7088
|
next: response.next,
|
|
@@ -6933,6 +7091,17 @@ class FeedsClient extends FeedsApi {
|
|
|
6933
7091
|
duration: response.duration
|
|
6934
7092
|
};
|
|
6935
7093
|
}
|
|
7094
|
+
async ownCapabilitiesBatch(request) {
|
|
7095
|
+
const response = await super.ownCapabilitiesBatch(request);
|
|
7096
|
+
const feedResponses = Object.entries(response.capabilities).map(
|
|
7097
|
+
([feed, own_capabilities]) => ({
|
|
7098
|
+
feed,
|
|
7099
|
+
own_capabilities
|
|
7100
|
+
})
|
|
7101
|
+
);
|
|
7102
|
+
this.hydrateCapabilitiesCache(feedResponses);
|
|
7103
|
+
return response;
|
|
7104
|
+
}
|
|
6936
7105
|
async updateFollow(request) {
|
|
6937
7106
|
const response = await super.updateFollow(request);
|
|
6938
7107
|
[
|
|
@@ -7000,98 +7169,27 @@ class FeedsClient extends FeedsApi {
|
|
|
7000
7169
|
);
|
|
7001
7170
|
}
|
|
7002
7171
|
}
|
|
7003
|
-
const ChannelOwnCapability = {
|
|
7004
|
-
BAN_CHANNEL_MEMBERS: "ban-channel-members",
|
|
7005
|
-
CAST_POLL_VOTE: "cast-poll-vote",
|
|
7006
|
-
CONNECT_EVENTS: "connect-events",
|
|
7007
|
-
CREATE_ATTACHMENT: "create-attachment",
|
|
7008
|
-
DELETE_ANY_MESSAGE: "delete-any-message",
|
|
7009
|
-
DELETE_CHANNEL: "delete-channel",
|
|
7010
|
-
DELETE_OWN_MESSAGE: "delete-own-message",
|
|
7011
|
-
FLAG_MESSAGE: "flag-message",
|
|
7012
|
-
FREEZE_CHANNEL: "freeze-channel",
|
|
7013
|
-
JOIN_CHANNEL: "join-channel",
|
|
7014
|
-
LEAVE_CHANNEL: "leave-channel",
|
|
7015
|
-
MUTE_CHANNEL: "mute-channel",
|
|
7016
|
-
PIN_MESSAGE: "pin-message",
|
|
7017
|
-
QUERY_POLL_VOTES: "query-poll-votes",
|
|
7018
|
-
QUOTE_MESSAGE: "quote-message",
|
|
7019
|
-
READ_EVENTS: "read-events",
|
|
7020
|
-
SEARCH_MESSAGES: "search-messages",
|
|
7021
|
-
SEND_CUSTOM_EVENTS: "send-custom-events",
|
|
7022
|
-
SEND_LINKS: "send-links",
|
|
7023
|
-
SEND_MESSAGE: "send-message",
|
|
7024
|
-
SEND_POLL: "send-poll",
|
|
7025
|
-
SEND_REACTION: "send-reaction",
|
|
7026
|
-
SEND_REPLY: "send-reply",
|
|
7027
|
-
SEND_RESTRICTED_VISIBILITY_MESSAGE: "send-restricted-visibility-message",
|
|
7028
|
-
SEND_TYPING_EVENTS: "send-typing-events",
|
|
7029
|
-
SET_CHANNEL_COOLDOWN: "set-channel-cooldown",
|
|
7030
|
-
SHARE_LOCATION: "share-location",
|
|
7031
|
-
SKIP_SLOW_MODE: "skip-slow-mode",
|
|
7032
|
-
SLOW_MODE: "slow-mode",
|
|
7033
|
-
TYPING_EVENTS: "typing-events",
|
|
7034
|
-
UPDATE_ANY_MESSAGE: "update-any-message",
|
|
7035
|
-
UPDATE_CHANNEL: "update-channel",
|
|
7036
|
-
UPDATE_CHANNEL_MEMBERS: "update-channel-members",
|
|
7037
|
-
UPDATE_OWN_MESSAGE: "update-own-message",
|
|
7038
|
-
UPDATE_THREAD: "update-thread",
|
|
7039
|
-
UPLOAD_FILE: "upload-file"
|
|
7040
|
-
};
|
|
7041
|
-
const FeedOwnCapability = {
|
|
7042
|
-
ADD_ACTIVITY: "add-activity",
|
|
7043
|
-
ADD_ACTIVITY_BOOKMARK: "add-activity-bookmark",
|
|
7044
|
-
ADD_ACTIVITY_REACTION: "add-activity-reaction",
|
|
7045
|
-
ADD_COMMENT: "add-comment",
|
|
7046
|
-
ADD_COMMENT_REACTION: "add-comment-reaction",
|
|
7047
|
-
CREATE_FEED: "create-feed",
|
|
7048
|
-
DELETE_ANY_ACTIVITY: "delete-any-activity",
|
|
7049
|
-
DELETE_ANY_COMMENT: "delete-any-comment",
|
|
7050
|
-
DELETE_FEED: "delete-feed",
|
|
7051
|
-
DELETE_OWN_ACTIVITY: "delete-own-activity",
|
|
7052
|
-
DELETE_OWN_ACTIVITY_BOOKMARK: "delete-own-activity-bookmark",
|
|
7053
|
-
DELETE_OWN_ACTIVITY_REACTION: "delete-own-activity-reaction",
|
|
7054
|
-
DELETE_OWN_COMMENT: "delete-own-comment",
|
|
7055
|
-
DELETE_OWN_COMMENT_REACTION: "delete-own-comment-reaction",
|
|
7056
|
-
FOLLOW: "follow",
|
|
7057
|
-
PIN_ACTIVITY: "pin-activity",
|
|
7058
|
-
QUERY_FEED_MEMBERS: "query-feed-members",
|
|
7059
|
-
QUERY_FOLLOWS: "query-follows",
|
|
7060
|
-
READ_ACTIVITIES: "read-activities",
|
|
7061
|
-
READ_FEED: "read-feed",
|
|
7062
|
-
UNFOLLOW: "unfollow",
|
|
7063
|
-
UPDATE_ANY_ACTIVITY: "update-any-activity",
|
|
7064
|
-
UPDATE_ANY_COMMENT: "update-any-comment",
|
|
7065
|
-
UPDATE_FEED: "update-feed",
|
|
7066
|
-
UPDATE_FEED_FOLLOWERS: "update-feed-followers",
|
|
7067
|
-
UPDATE_FEED_MEMBERS: "update-feed-members",
|
|
7068
|
-
UPDATE_OWN_ACTIVITY: "update-own-activity",
|
|
7069
|
-
UPDATE_OWN_ACTIVITY_BOOKMARK: "update-own-activity-bookmark",
|
|
7070
|
-
UPDATE_OWN_COMMENT: "update-own-comment"
|
|
7071
|
-
};
|
|
7072
7172
|
export {
|
|
7073
|
-
|
|
7173
|
+
Constants as C,
|
|
7074
7174
|
FeedsClient as F,
|
|
7075
7175
|
StreamApiError as S,
|
|
7076
7176
|
Feed as a,
|
|
7077
|
-
|
|
7078
|
-
|
|
7177
|
+
StreamPoll as b,
|
|
7178
|
+
checkHasAnotherPage as c,
|
|
7079
7179
|
debounce as d,
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7180
|
+
isFollowResponse as e,
|
|
7181
|
+
isReactionResponse as f,
|
|
7182
|
+
isCommentResponse as g,
|
|
7183
|
+
isImageFile as h,
|
|
7084
7184
|
isVoteAnswer as i,
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
getLogger as p,
|
|
7092
|
-
ensureExhausted as q,
|
|
7185
|
+
isVideoFile as j,
|
|
7186
|
+
getStateUpdateQueueId as k,
|
|
7187
|
+
updateEntityInArray as l,
|
|
7188
|
+
configureLoggers as m,
|
|
7189
|
+
getLogger as n,
|
|
7190
|
+
ensureExhausted as o,
|
|
7093
7191
|
replaceUniqueArrayMerge as r,
|
|
7094
7192
|
shouldUpdateState as s,
|
|
7095
7193
|
uniqueArrayMerge as u
|
|
7096
7194
|
};
|
|
7097
|
-
//# sourceMappingURL=
|
|
7195
|
+
//# sourceMappingURL=feeds-client-CFadXO-B.mjs.map
|