@singi-labs/sifa-sdk 0.18.22 → 0.19.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/dist/badge/index.cjs.map +1 -1
- package/dist/badge/index.js.map +1 -1
- package/dist/{feed-BMm9Pkew.d.cts → follow-profile-D1l6pulB.d.cts} +1 -190
- package/dist/{feed-BMm9Pkew.d.ts → follow-profile-D1l6pulB.d.ts} +1 -190
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{network-map-Dupds9nG.d.cts → network-map-C8VCE7HI.d.cts} +2 -2
- package/dist/{network-map-Cwef6yhK.d.ts → network-map-DNE9jp_r.d.ts} +2 -2
- package/dist/{org-DgC4pecF.d.cts → org-8RWC0qSH.d.cts} +198 -191
- package/dist/{org-DC_71Ojb.d.ts → org-BwK-97S0.d.ts} +198 -191
- package/dist/{profile-investment-Bvulg_jG.d.cts → profile-investment-D-nKT3ZK.d.cts} +190 -1
- package/dist/{profile-investment-Bvulg_jG.d.ts → profile-investment-D-nKT3ZK.d.ts} +190 -1
- package/dist/query/fetchers/index.cjs +9 -9
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +4 -4
- package/dist/query/fetchers/index.d.ts +4 -4
- package/dist/query/fetchers/index.js +9 -9
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +11 -17
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +4 -4
- package/dist/query/hooks/index.d.ts +4 -4
- package/dist/query/hooks/index.js +11 -17
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +12 -18
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +6 -6
- package/dist/query/index.d.ts +6 -6
- package/dist/query/index.js +12 -18
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.d.cts +2 -2
- package/dist/schemas/index.d.ts +2 -2
- package/dist/{use-org-notification-emails-ZmOjvMh0.d.cts → use-org-notification-emails-CeDxRlis.d.cts} +7 -40
- package/dist/{use-org-notification-emails-CHU0JhlL.d.ts → use-org-notification-emails-LIoQtBgD.d.ts} +7 -40
- package/package.json +1 -1
package/dist/query/index.cjs
CHANGED
|
@@ -1238,25 +1238,25 @@ async function getFollowing(config, handle, opts = {}) {
|
|
|
1238
1238
|
return { follows: [], cursor: null };
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
|
-
|
|
1241
|
+
var FOLLOWING_FEED_LXM = "id.sifa.feed.getFollowingFeed";
|
|
1242
|
+
async function fetchFollowingFeed(config, opts = {}) {
|
|
1242
1243
|
const params = new URLSearchParams();
|
|
1243
|
-
if (opts.cursor) params.set("cursor", opts.cursor);
|
|
1244
1244
|
if (opts.limit) params.set("limit", String(opts.limit));
|
|
1245
|
-
if (opts.categories && opts.categories.length > 0) {
|
|
1246
|
-
params.set("categories", opts.categories.join(","));
|
|
1247
|
-
}
|
|
1248
1245
|
const qs = params.toString();
|
|
1249
1246
|
const headers = { ...opts.headers ?? {} };
|
|
1250
1247
|
if (opts.cookieHeader) headers.cookie = opts.cookieHeader;
|
|
1248
|
+
if (config.getAuthToken) {
|
|
1249
|
+
const token = await config.getAuthToken(FOLLOWING_FEED_LXM);
|
|
1250
|
+
if (token) headers.Authorization = `Bearer ${token}`;
|
|
1251
|
+
}
|
|
1251
1252
|
try {
|
|
1252
|
-
|
|
1253
|
+
return await apiFetch(
|
|
1253
1254
|
config,
|
|
1254
1255
|
`/api/following/feed${qs ? `?${qs}` : ""}`,
|
|
1255
1256
|
{ credentials: "include", cache: "no-store", ...opts, headers }
|
|
1256
1257
|
);
|
|
1257
|
-
return { items: res.items ?? [], cursor: res.cursor ?? null };
|
|
1258
1258
|
} catch {
|
|
1259
|
-
return
|
|
1259
|
+
return null;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
@@ -3158,15 +3158,9 @@ function useFollowingList(handle, opts = {}, options) {
|
|
|
3158
3158
|
}
|
|
3159
3159
|
function useFollowingFeed(opts = {}, options) {
|
|
3160
3160
|
const config = useSifaConfig();
|
|
3161
|
-
|
|
3162
|
-
limit: opts.limit,
|
|
3163
|
-
|
|
3164
|
-
};
|
|
3165
|
-
return reactQuery.useInfiniteQuery({
|
|
3166
|
-
queryKey: sifaQueryKeys.follow.feed(keyOpts),
|
|
3167
|
-
queryFn: ({ pageParam }) => getFollowingFeed(config, { ...opts, cursor: pageParam }),
|
|
3168
|
-
initialPageParam: void 0,
|
|
3169
|
-
getNextPageParam: (lastPage) => lastPage.cursor ?? void 0,
|
|
3161
|
+
return reactQuery.useQuery({
|
|
3162
|
+
queryKey: sifaQueryKeys.follow.feed({ limit: opts.limit }),
|
|
3163
|
+
queryFn: () => fetchFollowingFeed(config, opts),
|
|
3170
3164
|
...options
|
|
3171
3165
|
});
|
|
3172
3166
|
}
|
|
@@ -3748,6 +3742,7 @@ exports.fetchEntitySearch = fetchEntitySearch;
|
|
|
3748
3742
|
exports.fetchExternalAccounts = fetchExternalAccounts;
|
|
3749
3743
|
exports.fetchFeaturedProfile = fetchFeaturedProfile;
|
|
3750
3744
|
exports.fetchFollowing = fetchFollowing;
|
|
3745
|
+
exports.fetchFollowingFeed = fetchFollowingFeed;
|
|
3751
3746
|
exports.fetchGetProfileView = fetchGetProfileView;
|
|
3752
3747
|
exports.fetchGivenConfirmations = fetchGivenConfirmations;
|
|
3753
3748
|
exports.fetchHeatmapData = fetchHeatmapData;
|
|
@@ -3786,7 +3781,6 @@ exports.getAdminReviewQueues = getAdminReviewQueues;
|
|
|
3786
3781
|
exports.getBlueskySuggestions = getBlueskySuggestions;
|
|
3787
3782
|
exports.getFollowers = getFollowers;
|
|
3788
3783
|
exports.getFollowing = getFollowing;
|
|
3789
|
-
exports.getFollowingFeed = getFollowingFeed;
|
|
3790
3784
|
exports.getMutuals = getMutuals;
|
|
3791
3785
|
exports.hideActivityItem = hideActivityItem;
|
|
3792
3786
|
exports.hideKeytraceClaim = hideKeytraceClaim;
|