@ecency/sdk 2.3.63 → 2.3.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser/index.d.ts
CHANGED
|
@@ -960,6 +960,18 @@ declare function withTimeoutSignal(timeoutMs: number, signal?: AbortSignal): Abo
|
|
|
960
960
|
declare const INTERNAL_API_TIMEOUT_MS = 10000;
|
|
961
961
|
declare const CONFIG: {
|
|
962
962
|
privateApiHost: string;
|
|
963
|
+
/**
|
|
964
|
+
* Observer used for bridge calls when nobody is logged in. The bridge applies
|
|
965
|
+
* this account's mute list to the response, marking muted authors' posts and
|
|
966
|
+
* comments `stats.gray` so clients can dim or collapse them. Anonymous
|
|
967
|
+
* visitors therefore inherit Ecency's moderation instead of seeing an
|
|
968
|
+
* unfiltered firehose. Apps may override via `ConfigManager.setDefaultObserver`,
|
|
969
|
+
* which expects a real account rather than "" (see that setter).
|
|
970
|
+
*
|
|
971
|
+
* Note this only *marks* content: the bridge still returns muted authors'
|
|
972
|
+
* posts, so an observer never shortens a feed.
|
|
973
|
+
*/
|
|
974
|
+
defaultObserver: string;
|
|
963
975
|
/**
|
|
964
976
|
* First-party client identifier sent as the `X-Ecency-Client` header on
|
|
965
977
|
* search/private API requests. Lets the origin distinguish Ecency's own
|
|
@@ -1029,6 +1041,20 @@ declare namespace ConfigManager {
|
|
|
1029
1041
|
* @param clientId - Short client label
|
|
1030
1042
|
*/
|
|
1031
1043
|
function setClientId(clientId: string): void;
|
|
1044
|
+
/**
|
|
1045
|
+
* Set the observer used for bridge calls made without a logged-in user.
|
|
1046
|
+
* Defaults to "ecency"; a third-party integrator should point this at their
|
|
1047
|
+
* own moderation account.
|
|
1048
|
+
*
|
|
1049
|
+
* Must be a real account. An empty value is rejected rather than treated as
|
|
1050
|
+
* an opt-out: consumers resolve the observer with `||`, and `getDiscussion`
|
|
1051
|
+
* separately falls back to the post author, so "" would not disable mute
|
|
1052
|
+
* marking. It would silently observe as someone else while being cached under
|
|
1053
|
+
* "", leaving the request and its cache key describing different things.
|
|
1054
|
+
* @param observer - Hive account whose mute list applies to anonymous reads
|
|
1055
|
+
* @throws If given an empty or whitespace-only value
|
|
1056
|
+
*/
|
|
1057
|
+
function setDefaultObserver(observer: string): void;
|
|
1032
1058
|
/**
|
|
1033
1059
|
* Get a validated base URL for API requests
|
|
1034
1060
|
* Returns a valid base URL that can be used with new URL(path, baseUrl)
|