@stream-io/feeds-client 0.2.18 → 0.2.20
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 +23 -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-Zde8UE5f.mjs → feeds-client-BObWT4vl.mjs} +191 -92
- package/dist/feeds-client-BObWT4vl.mjs.map +1 -0
- package/dist/{index--koeDtxd.js → feeds-client-BlR_3zy2.js} +178 -79
- package/dist/feeds-client-BlR_3zy2.js.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 +44 -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.20";
|
|
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,91 @@ 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 BATCH_OWN_CAPABILITIES_API_LIMIT = 100;
|
|
6632
|
+
const DEFAULT_BATCH_OWN_CAPABILITIES_THROTTLING_INTERVAL = 2e3;
|
|
6633
|
+
const queuedFeeds = /* @__PURE__ */ new Set();
|
|
6634
|
+
function queueBatchedOwnCapabilities({ feeds }) {
|
|
6635
|
+
for (const feed of feeds) {
|
|
6636
|
+
queuedFeeds.add(feed);
|
|
6637
|
+
}
|
|
6638
|
+
if (queuedFeeds.size > 0) {
|
|
6639
|
+
this.throttledGetBatchOwnCapabilities(
|
|
6640
|
+
[...queuedFeeds].slice(0, BATCH_OWN_CAPABILITIES_API_LIMIT),
|
|
6641
|
+
(feedsToClear) => {
|
|
6642
|
+
for (const feed of feedsToClear) {
|
|
6643
|
+
queuedFeeds.delete(feed);
|
|
6644
|
+
}
|
|
6645
|
+
}
|
|
6646
|
+
);
|
|
6647
|
+
}
|
|
6648
|
+
}
|
|
6649
|
+
function clearQueuedFeeds() {
|
|
6650
|
+
queuedFeeds.clear();
|
|
6651
|
+
}
|
|
6546
6652
|
class FeedsClient extends FeedsApi {
|
|
6547
6653
|
constructor(apiKey, options) {
|
|
6548
6654
|
const tokenManager = new TokenManager();
|
|
@@ -6557,6 +6663,29 @@ class FeedsClient extends FeedsApi {
|
|
|
6557
6663
|
this.eventDispatcher = new EventDispatcher();
|
|
6558
6664
|
this.activeFeeds = {};
|
|
6559
6665
|
this.healthyConnectionChangedEventCount = 0;
|
|
6666
|
+
this.setGetBatchOwnCapabilitiesThrottlingInterval = (throttlingMs) => {
|
|
6667
|
+
const {
|
|
6668
|
+
throttledFn: throttledGetBatchOwnCapabilities,
|
|
6669
|
+
cancelTimer: cancel
|
|
6670
|
+
} = throttle(
|
|
6671
|
+
(feeds, callback) => {
|
|
6672
|
+
this.ownCapabilitiesBatch({
|
|
6673
|
+
feeds
|
|
6674
|
+
}).catch((error) => {
|
|
6675
|
+
this.eventDispatcher.dispatch({
|
|
6676
|
+
type: "errors.unhandled",
|
|
6677
|
+
error_type: UnhandledErrorType.FetchingOwnCapabilitiesOnNewActivity,
|
|
6678
|
+
error
|
|
6679
|
+
});
|
|
6680
|
+
});
|
|
6681
|
+
callback(feeds);
|
|
6682
|
+
},
|
|
6683
|
+
throttlingMs,
|
|
6684
|
+
{ trailing: true }
|
|
6685
|
+
);
|
|
6686
|
+
this.throttledGetBatchOwnCapabilities = throttledGetBatchOwnCapabilities;
|
|
6687
|
+
this.cancelGetBatchOwnCapabilitiesTimer = cancel;
|
|
6688
|
+
};
|
|
6560
6689
|
this.recoverOnReconnect = async () => {
|
|
6561
6690
|
this.healthyConnectionChangedEventCount++;
|
|
6562
6691
|
if (this.healthyConnectionChangedEventCount > 1) {
|
|
@@ -6580,6 +6709,9 @@ class FeedsClient extends FeedsApi {
|
|
|
6580
6709
|
throw new Error(`Can't connect a new user, call "disconnectUser" first`);
|
|
6581
6710
|
}
|
|
6582
6711
|
this.tokenManager.setTokenOrProvider(tokenProvider);
|
|
6712
|
+
this.setGetBatchOwnCapabilitiesThrottlingInterval(
|
|
6713
|
+
this.query_batch_own_capabilties_throttling_interval
|
|
6714
|
+
);
|
|
6583
6715
|
try {
|
|
6584
6716
|
addConnectionEventListeners(this.updateNetworkConnectionStatus);
|
|
6585
6717
|
this.wsConnection = new StableWSConnection(
|
|
@@ -6746,10 +6878,14 @@ class FeedsClient extends FeedsApi {
|
|
|
6746
6878
|
removeConnectionEventListeners(this.updateNetworkConnectionStatus);
|
|
6747
6879
|
this.connectionIdManager.reset();
|
|
6748
6880
|
this.tokenManager.reset();
|
|
6881
|
+
this.polls_by_id.clear();
|
|
6749
6882
|
this.state.partialNext({
|
|
6750
6883
|
connected_user: void 0,
|
|
6751
|
-
is_ws_connection_healthy: false
|
|
6884
|
+
is_ws_connection_healthy: false,
|
|
6885
|
+
own_capabilities_by_fid: {}
|
|
6752
6886
|
});
|
|
6887
|
+
this.cancelGetBatchOwnCapabilitiesTimer();
|
|
6888
|
+
clearQueuedFeeds();
|
|
6753
6889
|
};
|
|
6754
6890
|
this.on = this.eventDispatcher.on;
|
|
6755
6891
|
this.off = this.eventDispatcher.off;
|
|
@@ -6790,12 +6926,14 @@ class FeedsClient extends FeedsApi {
|
|
|
6790
6926
|
};
|
|
6791
6927
|
this.state = new StateStore({
|
|
6792
6928
|
connected_user: void 0,
|
|
6793
|
-
is_ws_connection_healthy: false
|
|
6929
|
+
is_ws_connection_healthy: false,
|
|
6930
|
+
own_capabilities_by_fid: {}
|
|
6794
6931
|
});
|
|
6795
6932
|
this.moderation = new ModerationClient(apiClient);
|
|
6796
6933
|
this.tokenManager = tokenManager;
|
|
6797
6934
|
this.connectionIdManager = connectionIdManager;
|
|
6798
6935
|
this.polls_by_id = /* @__PURE__ */ new Map();
|
|
6936
|
+
this.query_batch_own_capabilties_throttling_interval = options?.query_batch_own_capabilties_throttling_interval ?? DEFAULT_BATCH_OWN_CAPABILITIES_THROTTLING_INTERVAL;
|
|
6799
6937
|
configureLoggers(options?.configure_loggers_options);
|
|
6800
6938
|
this.on("all", (event) => {
|
|
6801
6939
|
const fid = event.fid;
|
|
@@ -6915,9 +7053,29 @@ class FeedsClient extends FeedsApi {
|
|
|
6915
7053
|
}
|
|
6916
7054
|
}
|
|
6917
7055
|
}
|
|
7056
|
+
hydrateCapabilitiesCache(feedResponses) {
|
|
7057
|
+
let ownCapabilitiesCache = this.state.getLatestValue().own_capabilities_by_fid;
|
|
7058
|
+
const capabilitiesToFetchQueue = [];
|
|
7059
|
+
for (const feedResponse of feedResponses) {
|
|
7060
|
+
const { feed, own_capabilities } = feedResponse;
|
|
7061
|
+
if (!Object.prototype.hasOwnProperty.call(ownCapabilitiesCache, feed)) {
|
|
7062
|
+
if (own_capabilities) {
|
|
7063
|
+
ownCapabilitiesCache = {
|
|
7064
|
+
...ownCapabilitiesCache,
|
|
7065
|
+
[feed]: own_capabilities
|
|
7066
|
+
};
|
|
7067
|
+
} else {
|
|
7068
|
+
capabilitiesToFetchQueue.push(feed);
|
|
7069
|
+
}
|
|
7070
|
+
}
|
|
7071
|
+
}
|
|
7072
|
+
queueBatchedOwnCapabilities.bind(this)({ feeds: capabilitiesToFetchQueue });
|
|
7073
|
+
this.state.partialNext({ own_capabilities_by_fid: ownCapabilitiesCache });
|
|
7074
|
+
}
|
|
6918
7075
|
async queryFeeds(request) {
|
|
6919
7076
|
const response = await this._queryFeeds(request);
|
|
6920
|
-
const
|
|
7077
|
+
const feedResponses = response.feeds;
|
|
7078
|
+
const feeds = feedResponses.map(
|
|
6921
7079
|
(feedResponse) => this.getOrCreateActiveFeed(
|
|
6922
7080
|
feedResponse.group_id,
|
|
6923
7081
|
feedResponse.id,
|
|
@@ -6925,6 +7083,7 @@ class FeedsClient extends FeedsApi {
|
|
|
6925
7083
|
request?.watch
|
|
6926
7084
|
)
|
|
6927
7085
|
);
|
|
7086
|
+
this.hydrateCapabilitiesCache(feedResponses);
|
|
6928
7087
|
return {
|
|
6929
7088
|
feeds,
|
|
6930
7089
|
next: response.next,
|
|
@@ -6933,6 +7092,17 @@ class FeedsClient extends FeedsApi {
|
|
|
6933
7092
|
duration: response.duration
|
|
6934
7093
|
};
|
|
6935
7094
|
}
|
|
7095
|
+
async ownCapabilitiesBatch(request) {
|
|
7096
|
+
const response = await super.ownCapabilitiesBatch(request);
|
|
7097
|
+
const feedResponses = Object.entries(response.capabilities).map(
|
|
7098
|
+
([feed, own_capabilities]) => ({
|
|
7099
|
+
feed,
|
|
7100
|
+
own_capabilities
|
|
7101
|
+
})
|
|
7102
|
+
);
|
|
7103
|
+
this.hydrateCapabilitiesCache(feedResponses);
|
|
7104
|
+
return response;
|
|
7105
|
+
}
|
|
6936
7106
|
async updateFollow(request) {
|
|
6937
7107
|
const response = await super.updateFollow(request);
|
|
6938
7108
|
[
|
|
@@ -7000,98 +7170,27 @@ class FeedsClient extends FeedsApi {
|
|
|
7000
7170
|
);
|
|
7001
7171
|
}
|
|
7002
7172
|
}
|
|
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
7173
|
export {
|
|
7073
|
-
|
|
7174
|
+
Constants as C,
|
|
7074
7175
|
FeedsClient as F,
|
|
7075
7176
|
StreamApiError as S,
|
|
7076
7177
|
Feed as a,
|
|
7077
|
-
|
|
7078
|
-
|
|
7178
|
+
StreamPoll as b,
|
|
7179
|
+
checkHasAnotherPage as c,
|
|
7079
7180
|
debounce as d,
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7181
|
+
isFollowResponse as e,
|
|
7182
|
+
isReactionResponse as f,
|
|
7183
|
+
isCommentResponse as g,
|
|
7184
|
+
isImageFile as h,
|
|
7084
7185
|
isVoteAnswer as i,
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
getLogger as p,
|
|
7092
|
-
ensureExhausted as q,
|
|
7186
|
+
isVideoFile as j,
|
|
7187
|
+
getStateUpdateQueueId as k,
|
|
7188
|
+
updateEntityInArray as l,
|
|
7189
|
+
configureLoggers as m,
|
|
7190
|
+
getLogger as n,
|
|
7191
|
+
ensureExhausted as o,
|
|
7093
7192
|
replaceUniqueArrayMerge as r,
|
|
7094
7193
|
shouldUpdateState as s,
|
|
7095
7194
|
uniqueArrayMerge as u
|
|
7096
7195
|
};
|
|
7097
|
-
//# sourceMappingURL=
|
|
7196
|
+
//# sourceMappingURL=feeds-client-BObWT4vl.mjs.map
|