@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
|
@@ -3748,7 +3748,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
|
|
|
3748
3748
|
};
|
|
3749
3749
|
return result;
|
|
3750
3750
|
};
|
|
3751
|
-
const version = "0.2.
|
|
3751
|
+
const version = "0.2.19";
|
|
3752
3752
|
class ApiClient {
|
|
3753
3753
|
constructor(apiKey, tokenManager, connectionIdManager, options) {
|
|
3754
3754
|
this.apiKey = apiKey;
|
|
@@ -5348,7 +5348,12 @@ function handleActivityAdded(event) {
|
|
|
5348
5348
|
this.currentState.addNewActivitiesTo
|
|
5349
5349
|
);
|
|
5350
5350
|
if (result.changed) {
|
|
5351
|
-
|
|
5351
|
+
const activity = event.activity;
|
|
5352
|
+
this.client.hydratePollCache([activity]);
|
|
5353
|
+
const currentFeed = activity.current_feed;
|
|
5354
|
+
if (currentFeed) {
|
|
5355
|
+
this.client.hydrateCapabilitiesCache([currentFeed]);
|
|
5356
|
+
}
|
|
5352
5357
|
this.state.partialNext({ activities: result.activities });
|
|
5353
5358
|
}
|
|
5354
5359
|
}
|
|
@@ -5460,6 +5465,9 @@ function handleActivityUpdated(payload, fromWs) {
|
|
|
5460
5465
|
];
|
|
5461
5466
|
if (result1?.changed || result2.changed) {
|
|
5462
5467
|
this.client.hydratePollCache([payload.activity]);
|
|
5468
|
+
if (payload.activity.current_feed) {
|
|
5469
|
+
this.client.hydrateCapabilitiesCache([payload.activity.current_feed]);
|
|
5470
|
+
}
|
|
5463
5471
|
this.state.partialNext({
|
|
5464
5472
|
activities: result1?.changed ? result1.entities : currentActivities,
|
|
5465
5473
|
pinned_activities: result2.entities
|
|
@@ -6084,6 +6092,13 @@ const _Feed = class _Feed extends FeedApi {
|
|
|
6084
6092
|
});
|
|
6085
6093
|
try {
|
|
6086
6094
|
const response = await super.getOrCreate(request);
|
|
6095
|
+
const currentActivityFeeds = [];
|
|
6096
|
+
for (const activity of response.activities) {
|
|
6097
|
+
if (activity.current_feed) {
|
|
6098
|
+
currentActivityFeeds.push(activity.current_feed);
|
|
6099
|
+
}
|
|
6100
|
+
}
|
|
6101
|
+
this.client.hydrateCapabilitiesCache([response.feed, ...currentActivityFeeds]);
|
|
6087
6102
|
if (request?.next) {
|
|
6088
6103
|
const { activities: currentActivities = [] } = this.currentState;
|
|
6089
6104
|
const result = addActivitiesToState.bind(this)(
|
|
@@ -6493,11 +6508,16 @@ const _Feed = class _Feed extends FeedApi {
|
|
|
6493
6508
|
limit: currentState.last_get_or_create_request_config?.limit ?? 20
|
|
6494
6509
|
});
|
|
6495
6510
|
}
|
|
6496
|
-
addActivity(request) {
|
|
6497
|
-
|
|
6511
|
+
async addActivity(request) {
|
|
6512
|
+
const response = await this.client.addActivity({
|
|
6498
6513
|
...request,
|
|
6499
6514
|
feeds: [this.feed]
|
|
6500
6515
|
});
|
|
6516
|
+
const currentFeed = response.activity.current_feed;
|
|
6517
|
+
if (currentFeed) {
|
|
6518
|
+
this.client.hydrateCapabilitiesCache([currentFeed]);
|
|
6519
|
+
}
|
|
6520
|
+
return response;
|
|
6501
6521
|
}
|
|
6502
6522
|
handleWSEvent(event) {
|
|
6503
6523
|
const eventHandler = this.eventHandlers[event.type];
|
|
@@ -6531,6 +6551,7 @@ function handleUserUpdated(event) {
|
|
|
6531
6551
|
}
|
|
6532
6552
|
var UnhandledErrorType = /* @__PURE__ */ ((UnhandledErrorType2) => {
|
|
6533
6553
|
UnhandledErrorType2["ReconnectionReconciliation"] = "reconnection-reconciliation";
|
|
6554
|
+
UnhandledErrorType2["FetchingOwnCapabilitiesOnNewActivity"] = "fetching-own-capabilities-on-new-activity";
|
|
6534
6555
|
return UnhandledErrorType2;
|
|
6535
6556
|
})(UnhandledErrorType || {});
|
|
6536
6557
|
function updateCommentCount({
|
|
@@ -6561,6 +6582,90 @@ function updateCommentCount({
|
|
|
6561
6582
|
}, false);
|
|
6562
6583
|
}
|
|
6563
6584
|
}
|
|
6585
|
+
const throttle = (fn, timeout = 200, {
|
|
6586
|
+
leading = true,
|
|
6587
|
+
trailing = false
|
|
6588
|
+
} = {}) => {
|
|
6589
|
+
let timer = null;
|
|
6590
|
+
let storedArgs = null;
|
|
6591
|
+
let storedThis = null;
|
|
6592
|
+
let lastInvokeTime;
|
|
6593
|
+
const invoke = (args, thisArg) => {
|
|
6594
|
+
lastInvokeTime = Date.now();
|
|
6595
|
+
fn.apply(thisArg, args);
|
|
6596
|
+
};
|
|
6597
|
+
const scheduleTrailing = (delay) => {
|
|
6598
|
+
if (timer) return;
|
|
6599
|
+
timer = setTimeout(() => {
|
|
6600
|
+
timer = null;
|
|
6601
|
+
if (trailing && storedArgs) {
|
|
6602
|
+
invoke(storedArgs, storedThis);
|
|
6603
|
+
storedArgs = null;
|
|
6604
|
+
storedThis = null;
|
|
6605
|
+
}
|
|
6606
|
+
}, delay);
|
|
6607
|
+
};
|
|
6608
|
+
return {
|
|
6609
|
+
throttledFn: function(...args) {
|
|
6610
|
+
const now = Date.now();
|
|
6611
|
+
const hasBeenInvoked = lastInvokeTime != null;
|
|
6612
|
+
if (!hasBeenInvoked && !leading) lastInvokeTime = now;
|
|
6613
|
+
const timeSinceLast = hasBeenInvoked ? now - lastInvokeTime : timeout;
|
|
6614
|
+
const remaining = timeout - timeSinceLast;
|
|
6615
|
+
if (trailing) {
|
|
6616
|
+
storedArgs = args;
|
|
6617
|
+
storedThis = this;
|
|
6618
|
+
}
|
|
6619
|
+
if (remaining <= 0) {
|
|
6620
|
+
if (timer) {
|
|
6621
|
+
clearTimeout(timer);
|
|
6622
|
+
timer = null;
|
|
6623
|
+
}
|
|
6624
|
+
if (leading) {
|
|
6625
|
+
if (trailing) {
|
|
6626
|
+
if (storedArgs === args) {
|
|
6627
|
+
storedArgs = null;
|
|
6628
|
+
storedThis = null;
|
|
6629
|
+
}
|
|
6630
|
+
}
|
|
6631
|
+
invoke(args, this);
|
|
6632
|
+
} else {
|
|
6633
|
+
if (trailing) scheduleTrailing(timeout);
|
|
6634
|
+
}
|
|
6635
|
+
return;
|
|
6636
|
+
}
|
|
6637
|
+
if (trailing && !timer) {
|
|
6638
|
+
scheduleTrailing(remaining);
|
|
6639
|
+
}
|
|
6640
|
+
},
|
|
6641
|
+
cancelTimer: () => {
|
|
6642
|
+
if (timer) {
|
|
6643
|
+
clearTimeout(timer);
|
|
6644
|
+
timer = null;
|
|
6645
|
+
}
|
|
6646
|
+
}
|
|
6647
|
+
};
|
|
6648
|
+
};
|
|
6649
|
+
const DEFAULT_BATCH_OWN_CAPABILITIES_THROTTLING_INTERVAL = 2e3;
|
|
6650
|
+
const queuedFeeds = /* @__PURE__ */ new Set();
|
|
6651
|
+
function queueBatchedOwnCapabilities({ feeds }) {
|
|
6652
|
+
for (const feed of feeds) {
|
|
6653
|
+
queuedFeeds.add(feed);
|
|
6654
|
+
}
|
|
6655
|
+
if (queuedFeeds.size > 0) {
|
|
6656
|
+
this.throttledGetBatchOwnCapabilities(
|
|
6657
|
+
[...queuedFeeds],
|
|
6658
|
+
(feedsToClear) => {
|
|
6659
|
+
for (const feed of feedsToClear) {
|
|
6660
|
+
queuedFeeds.delete(feed);
|
|
6661
|
+
}
|
|
6662
|
+
}
|
|
6663
|
+
);
|
|
6664
|
+
}
|
|
6665
|
+
}
|
|
6666
|
+
function clearQueuedFeeds() {
|
|
6667
|
+
queuedFeeds.clear();
|
|
6668
|
+
}
|
|
6564
6669
|
class FeedsClient extends FeedsApi {
|
|
6565
6670
|
constructor(apiKey, options) {
|
|
6566
6671
|
const tokenManager = new TokenManager();
|
|
@@ -6575,6 +6680,29 @@ class FeedsClient extends FeedsApi {
|
|
|
6575
6680
|
this.eventDispatcher = new EventDispatcher();
|
|
6576
6681
|
this.activeFeeds = {};
|
|
6577
6682
|
this.healthyConnectionChangedEventCount = 0;
|
|
6683
|
+
this.setGetBatchOwnCapabilitiesThrottlingInterval = (throttlingMs) => {
|
|
6684
|
+
const {
|
|
6685
|
+
throttledFn: throttledGetBatchOwnCapabilities,
|
|
6686
|
+
cancelTimer: cancel
|
|
6687
|
+
} = throttle(
|
|
6688
|
+
(feeds, callback) => {
|
|
6689
|
+
this.ownCapabilitiesBatch({
|
|
6690
|
+
feeds
|
|
6691
|
+
}).catch((error) => {
|
|
6692
|
+
this.eventDispatcher.dispatch({
|
|
6693
|
+
type: "errors.unhandled",
|
|
6694
|
+
error_type: UnhandledErrorType.FetchingOwnCapabilitiesOnNewActivity,
|
|
6695
|
+
error
|
|
6696
|
+
});
|
|
6697
|
+
});
|
|
6698
|
+
callback(feeds);
|
|
6699
|
+
},
|
|
6700
|
+
throttlingMs,
|
|
6701
|
+
{ trailing: true }
|
|
6702
|
+
);
|
|
6703
|
+
this.throttledGetBatchOwnCapabilities = throttledGetBatchOwnCapabilities;
|
|
6704
|
+
this.cancelGetBatchOwnCapabilitiesTimer = cancel;
|
|
6705
|
+
};
|
|
6578
6706
|
this.recoverOnReconnect = async () => {
|
|
6579
6707
|
this.healthyConnectionChangedEventCount++;
|
|
6580
6708
|
if (this.healthyConnectionChangedEventCount > 1) {
|
|
@@ -6598,6 +6726,9 @@ class FeedsClient extends FeedsApi {
|
|
|
6598
6726
|
throw new Error(`Can't connect a new user, call "disconnectUser" first`);
|
|
6599
6727
|
}
|
|
6600
6728
|
this.tokenManager.setTokenOrProvider(tokenProvider);
|
|
6729
|
+
this.setGetBatchOwnCapabilitiesThrottlingInterval(
|
|
6730
|
+
this.query_batch_own_capabilties_throttling_interval
|
|
6731
|
+
);
|
|
6601
6732
|
try {
|
|
6602
6733
|
addConnectionEventListeners(this.updateNetworkConnectionStatus);
|
|
6603
6734
|
this.wsConnection = new StableWSConnection(
|
|
@@ -6764,10 +6895,14 @@ class FeedsClient extends FeedsApi {
|
|
|
6764
6895
|
removeConnectionEventListeners(this.updateNetworkConnectionStatus);
|
|
6765
6896
|
this.connectionIdManager.reset();
|
|
6766
6897
|
this.tokenManager.reset();
|
|
6898
|
+
this.polls_by_id.clear();
|
|
6767
6899
|
this.state.partialNext({
|
|
6768
6900
|
connected_user: void 0,
|
|
6769
|
-
is_ws_connection_healthy: false
|
|
6901
|
+
is_ws_connection_healthy: false,
|
|
6902
|
+
own_capabilities_by_fid: {}
|
|
6770
6903
|
});
|
|
6904
|
+
this.cancelGetBatchOwnCapabilitiesTimer();
|
|
6905
|
+
clearQueuedFeeds();
|
|
6771
6906
|
};
|
|
6772
6907
|
this.on = this.eventDispatcher.on;
|
|
6773
6908
|
this.off = this.eventDispatcher.off;
|
|
@@ -6808,12 +6943,14 @@ class FeedsClient extends FeedsApi {
|
|
|
6808
6943
|
};
|
|
6809
6944
|
this.state = new stateStore.StateStore({
|
|
6810
6945
|
connected_user: void 0,
|
|
6811
|
-
is_ws_connection_healthy: false
|
|
6946
|
+
is_ws_connection_healthy: false,
|
|
6947
|
+
own_capabilities_by_fid: {}
|
|
6812
6948
|
});
|
|
6813
6949
|
this.moderation = new ModerationClient(apiClient);
|
|
6814
6950
|
this.tokenManager = tokenManager;
|
|
6815
6951
|
this.connectionIdManager = connectionIdManager;
|
|
6816
6952
|
this.polls_by_id = /* @__PURE__ */ new Map();
|
|
6953
|
+
this.query_batch_own_capabilties_throttling_interval = options?.query_batch_own_capabilties_throttling_interval ?? DEFAULT_BATCH_OWN_CAPABILITIES_THROTTLING_INTERVAL;
|
|
6817
6954
|
configureLoggers(options?.configure_loggers_options);
|
|
6818
6955
|
this.on("all", (event) => {
|
|
6819
6956
|
const fid = event.fid;
|
|
@@ -6933,9 +7070,29 @@ class FeedsClient extends FeedsApi {
|
|
|
6933
7070
|
}
|
|
6934
7071
|
}
|
|
6935
7072
|
}
|
|
7073
|
+
hydrateCapabilitiesCache(feedResponses) {
|
|
7074
|
+
let ownCapabilitiesCache = this.state.getLatestValue().own_capabilities_by_fid;
|
|
7075
|
+
const capabilitiesToFetchQueue = [];
|
|
7076
|
+
for (const feedResponse of feedResponses) {
|
|
7077
|
+
const { feed, own_capabilities } = feedResponse;
|
|
7078
|
+
if (!Object.prototype.hasOwnProperty.call(ownCapabilitiesCache, feed)) {
|
|
7079
|
+
if (own_capabilities) {
|
|
7080
|
+
ownCapabilitiesCache = {
|
|
7081
|
+
...ownCapabilitiesCache,
|
|
7082
|
+
[feed]: own_capabilities
|
|
7083
|
+
};
|
|
7084
|
+
} else {
|
|
7085
|
+
capabilitiesToFetchQueue.push(feed);
|
|
7086
|
+
}
|
|
7087
|
+
}
|
|
7088
|
+
}
|
|
7089
|
+
queueBatchedOwnCapabilities.bind(this)({ feeds: capabilitiesToFetchQueue });
|
|
7090
|
+
this.state.partialNext({ own_capabilities_by_fid: ownCapabilitiesCache });
|
|
7091
|
+
}
|
|
6936
7092
|
async queryFeeds(request) {
|
|
6937
7093
|
const response = await this._queryFeeds(request);
|
|
6938
|
-
const
|
|
7094
|
+
const feedResponses = response.feeds;
|
|
7095
|
+
const feeds = feedResponses.map(
|
|
6939
7096
|
(feedResponse) => this.getOrCreateActiveFeed(
|
|
6940
7097
|
feedResponse.group_id,
|
|
6941
7098
|
feedResponse.id,
|
|
@@ -6943,6 +7100,7 @@ class FeedsClient extends FeedsApi {
|
|
|
6943
7100
|
request?.watch
|
|
6944
7101
|
)
|
|
6945
7102
|
);
|
|
7103
|
+
this.hydrateCapabilitiesCache(feedResponses);
|
|
6946
7104
|
return {
|
|
6947
7105
|
feeds,
|
|
6948
7106
|
next: response.next,
|
|
@@ -6951,6 +7109,17 @@ class FeedsClient extends FeedsApi {
|
|
|
6951
7109
|
duration: response.duration
|
|
6952
7110
|
};
|
|
6953
7111
|
}
|
|
7112
|
+
async ownCapabilitiesBatch(request) {
|
|
7113
|
+
const response = await super.ownCapabilitiesBatch(request);
|
|
7114
|
+
const feedResponses = Object.entries(response.capabilities).map(
|
|
7115
|
+
([feed, own_capabilities]) => ({
|
|
7116
|
+
feed,
|
|
7117
|
+
own_capabilities
|
|
7118
|
+
})
|
|
7119
|
+
);
|
|
7120
|
+
this.hydrateCapabilitiesCache(feedResponses);
|
|
7121
|
+
return response;
|
|
7122
|
+
}
|
|
6954
7123
|
async updateFollow(request) {
|
|
6955
7124
|
const response = await super.updateFollow(request);
|
|
6956
7125
|
[
|
|
@@ -7018,79 +7187,8 @@ class FeedsClient extends FeedsApi {
|
|
|
7018
7187
|
);
|
|
7019
7188
|
}
|
|
7020
7189
|
}
|
|
7021
|
-
const ChannelOwnCapability = {
|
|
7022
|
-
BAN_CHANNEL_MEMBERS: "ban-channel-members",
|
|
7023
|
-
CAST_POLL_VOTE: "cast-poll-vote",
|
|
7024
|
-
CONNECT_EVENTS: "connect-events",
|
|
7025
|
-
CREATE_ATTACHMENT: "create-attachment",
|
|
7026
|
-
DELETE_ANY_MESSAGE: "delete-any-message",
|
|
7027
|
-
DELETE_CHANNEL: "delete-channel",
|
|
7028
|
-
DELETE_OWN_MESSAGE: "delete-own-message",
|
|
7029
|
-
FLAG_MESSAGE: "flag-message",
|
|
7030
|
-
FREEZE_CHANNEL: "freeze-channel",
|
|
7031
|
-
JOIN_CHANNEL: "join-channel",
|
|
7032
|
-
LEAVE_CHANNEL: "leave-channel",
|
|
7033
|
-
MUTE_CHANNEL: "mute-channel",
|
|
7034
|
-
PIN_MESSAGE: "pin-message",
|
|
7035
|
-
QUERY_POLL_VOTES: "query-poll-votes",
|
|
7036
|
-
QUOTE_MESSAGE: "quote-message",
|
|
7037
|
-
READ_EVENTS: "read-events",
|
|
7038
|
-
SEARCH_MESSAGES: "search-messages",
|
|
7039
|
-
SEND_CUSTOM_EVENTS: "send-custom-events",
|
|
7040
|
-
SEND_LINKS: "send-links",
|
|
7041
|
-
SEND_MESSAGE: "send-message",
|
|
7042
|
-
SEND_POLL: "send-poll",
|
|
7043
|
-
SEND_REACTION: "send-reaction",
|
|
7044
|
-
SEND_REPLY: "send-reply",
|
|
7045
|
-
SEND_RESTRICTED_VISIBILITY_MESSAGE: "send-restricted-visibility-message",
|
|
7046
|
-
SEND_TYPING_EVENTS: "send-typing-events",
|
|
7047
|
-
SET_CHANNEL_COOLDOWN: "set-channel-cooldown",
|
|
7048
|
-
SHARE_LOCATION: "share-location",
|
|
7049
|
-
SKIP_SLOW_MODE: "skip-slow-mode",
|
|
7050
|
-
SLOW_MODE: "slow-mode",
|
|
7051
|
-
TYPING_EVENTS: "typing-events",
|
|
7052
|
-
UPDATE_ANY_MESSAGE: "update-any-message",
|
|
7053
|
-
UPDATE_CHANNEL: "update-channel",
|
|
7054
|
-
UPDATE_CHANNEL_MEMBERS: "update-channel-members",
|
|
7055
|
-
UPDATE_OWN_MESSAGE: "update-own-message",
|
|
7056
|
-
UPDATE_THREAD: "update-thread",
|
|
7057
|
-
UPLOAD_FILE: "upload-file"
|
|
7058
|
-
};
|
|
7059
|
-
const FeedOwnCapability = {
|
|
7060
|
-
ADD_ACTIVITY: "add-activity",
|
|
7061
|
-
ADD_ACTIVITY_BOOKMARK: "add-activity-bookmark",
|
|
7062
|
-
ADD_ACTIVITY_REACTION: "add-activity-reaction",
|
|
7063
|
-
ADD_COMMENT: "add-comment",
|
|
7064
|
-
ADD_COMMENT_REACTION: "add-comment-reaction",
|
|
7065
|
-
CREATE_FEED: "create-feed",
|
|
7066
|
-
DELETE_ANY_ACTIVITY: "delete-any-activity",
|
|
7067
|
-
DELETE_ANY_COMMENT: "delete-any-comment",
|
|
7068
|
-
DELETE_FEED: "delete-feed",
|
|
7069
|
-
DELETE_OWN_ACTIVITY: "delete-own-activity",
|
|
7070
|
-
DELETE_OWN_ACTIVITY_BOOKMARK: "delete-own-activity-bookmark",
|
|
7071
|
-
DELETE_OWN_ACTIVITY_REACTION: "delete-own-activity-reaction",
|
|
7072
|
-
DELETE_OWN_COMMENT: "delete-own-comment",
|
|
7073
|
-
DELETE_OWN_COMMENT_REACTION: "delete-own-comment-reaction",
|
|
7074
|
-
FOLLOW: "follow",
|
|
7075
|
-
PIN_ACTIVITY: "pin-activity",
|
|
7076
|
-
QUERY_FEED_MEMBERS: "query-feed-members",
|
|
7077
|
-
QUERY_FOLLOWS: "query-follows",
|
|
7078
|
-
READ_ACTIVITIES: "read-activities",
|
|
7079
|
-
READ_FEED: "read-feed",
|
|
7080
|
-
UNFOLLOW: "unfollow",
|
|
7081
|
-
UPDATE_ANY_ACTIVITY: "update-any-activity",
|
|
7082
|
-
UPDATE_ANY_COMMENT: "update-any-comment",
|
|
7083
|
-
UPDATE_FEED: "update-feed",
|
|
7084
|
-
UPDATE_FEED_FOLLOWERS: "update-feed-followers",
|
|
7085
|
-
UPDATE_FEED_MEMBERS: "update-feed-members",
|
|
7086
|
-
UPDATE_OWN_ACTIVITY: "update-own-activity",
|
|
7087
|
-
UPDATE_OWN_ACTIVITY_BOOKMARK: "update-own-activity-bookmark",
|
|
7088
|
-
UPDATE_OWN_COMMENT: "update-own-comment"
|
|
7089
|
-
};
|
|
7090
|
-
exports.ChannelOwnCapability = ChannelOwnCapability;
|
|
7091
7190
|
exports.Constants = Constants;
|
|
7092
7191
|
exports.Feed = Feed;
|
|
7093
|
-
exports.FeedOwnCapability = FeedOwnCapability;
|
|
7094
7192
|
exports.FeedsClient = FeedsClient;
|
|
7095
7193
|
exports.StreamApiError = StreamApiError;
|
|
7096
7194
|
exports.StreamPoll = StreamPoll;
|
|
@@ -7110,4 +7208,4 @@ exports.replaceUniqueArrayMerge = replaceUniqueArrayMerge;
|
|
|
7110
7208
|
exports.shouldUpdateState = shouldUpdateState;
|
|
7111
7209
|
exports.uniqueArrayMerge = uniqueArrayMerge;
|
|
7112
7210
|
exports.updateEntityInArray = updateEntityInArray;
|
|
7113
|
-
//# sourceMappingURL=
|
|
7211
|
+
//# sourceMappingURL=feeds-client-C09giTf1.js.map
|