@singi-labs/sifa-sdk 0.12.48 → 0.12.49
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/{index-D5yf1X4k.d.ts → index-CddvYEbj.d.ts} +11 -2
- package/dist/{index-DS-cxfHb.d.ts → index-L1xPmzKP.d.ts} +1 -1
- package/dist/{index-TELQkOMk.d.cts → index-r5KywRfC.d.cts} +11 -2
- package/dist/{index-X9PQhUnB.d.cts → index-wf6rbBZZ.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{org-C5Dzmo38.d.cts → org-CVLKBRsw.d.cts} +29 -2
- package/dist/{org-BtdoBUT6.d.ts → org-CZvX0wc7.d.ts} +29 -2
- package/dist/query/fetchers/index.cjs +27 -1
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +2 -2
- package/dist/query/fetchers/index.d.ts +2 -2
- package/dist/query/fetchers/index.js +27 -2
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +39 -1
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +2 -2
- package/dist/query/hooks/index.d.ts +2 -2
- package/dist/query/hooks/index.js +39 -2
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +38 -1
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/query/index.js +37 -2
- package/dist/query/index.js.map +1 -1
- package/package.json +1 -1
package/dist/query/index.cjs
CHANGED
|
@@ -1035,6 +1035,30 @@ function removeFeatureAllowlist(config, flag, did, opts = {}) {
|
|
|
1035
1035
|
);
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
|
+
// src/query/fetchers/admin-review-queues.ts
|
|
1039
|
+
async function getAdminReviewQueues(config, opts = {}) {
|
|
1040
|
+
const headers = { ...opts.headers ?? {} };
|
|
1041
|
+
if (opts.cookieHeader) headers.cookie = opts.cookieHeader;
|
|
1042
|
+
const res = await apiFetch(config, "/api/admin/stats/review-queues", {
|
|
1043
|
+
credentials: "include",
|
|
1044
|
+
cache: "no-store",
|
|
1045
|
+
...opts,
|
|
1046
|
+
headers
|
|
1047
|
+
});
|
|
1048
|
+
const ideas = res.ideas ?? 0;
|
|
1049
|
+
const nameCorrections = res.nameCorrections ?? 0;
|
|
1050
|
+
const pendingCompanies = res.pendingCompanies ?? 0;
|
|
1051
|
+
return {
|
|
1052
|
+
ideas,
|
|
1053
|
+
nameCorrections,
|
|
1054
|
+
pendingCompanies,
|
|
1055
|
+
// Derived rather than trusted so an API that predates the field still
|
|
1056
|
+
// yields a usable pill count.
|
|
1057
|
+
total: res.total ?? ideas + nameCorrections + pendingCompanies,
|
|
1058
|
+
generatedAt: res.generatedAt ?? ""
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1038
1062
|
// src/query/fetchers/activity.ts
|
|
1039
1063
|
async function fetchHeatmapData(config, handleOrDid, days, options = {}) {
|
|
1040
1064
|
const path = `/api/activity/${encodeIdentifier(handleOrDid)}/heatmap?days=${days}`;
|
|
@@ -1441,7 +1465,8 @@ var sifaQueryKeys = {
|
|
|
1441
1465
|
},
|
|
1442
1466
|
admin: {
|
|
1443
1467
|
all: () => ["sifa", "admin"],
|
|
1444
|
-
featureAllowlist: (flag) => ["sifa", "admin", "feature-allowlist", flag]
|
|
1468
|
+
featureAllowlist: (flag) => ["sifa", "admin", "feature-allowlist", flag],
|
|
1469
|
+
reviewQueues: () => ["sifa", "admin", "review-queues"]
|
|
1445
1470
|
},
|
|
1446
1471
|
stats: {
|
|
1447
1472
|
all: () => ["sifa", "stats"],
|
|
@@ -2630,6 +2655,16 @@ function useRemoveFeatureAllowlist(flag, options) {
|
|
|
2630
2655
|
}
|
|
2631
2656
|
);
|
|
2632
2657
|
}
|
|
2658
|
+
var REVIEW_QUEUES_STALE_TIME_MS = 6e4;
|
|
2659
|
+
function useAdminReviewQueues(options) {
|
|
2660
|
+
const config = useSifaConfig();
|
|
2661
|
+
return reactQuery.useQuery({
|
|
2662
|
+
queryKey: sifaQueryKeys.admin.reviewQueues(),
|
|
2663
|
+
queryFn: () => getAdminReviewQueues(config),
|
|
2664
|
+
staleTime: REVIEW_QUEUES_STALE_TIME_MS,
|
|
2665
|
+
...options
|
|
2666
|
+
});
|
|
2667
|
+
}
|
|
2633
2668
|
function useHeatmapData(handleOrDid, days, options) {
|
|
2634
2669
|
const config = useSifaConfig();
|
|
2635
2670
|
return reactQuery.useQuery({
|
|
@@ -3073,6 +3108,7 @@ exports.fetchSuggestionCount = fetchSuggestionCount;
|
|
|
3073
3108
|
exports.fetchSuggestions = fetchSuggestions;
|
|
3074
3109
|
exports.fetchWipePreview = fetchWipePreview;
|
|
3075
3110
|
exports.followUser = followUser;
|
|
3111
|
+
exports.getAdminReviewQueues = getAdminReviewQueues;
|
|
3076
3112
|
exports.getBlueskySuggestions = getBlueskySuggestions;
|
|
3077
3113
|
exports.getFollowers = getFollowers;
|
|
3078
3114
|
exports.getFollowing = getFollowing;
|
|
@@ -3133,6 +3169,7 @@ exports.useActivityFeed = useActivityFeed;
|
|
|
3133
3169
|
exports.useActivityTeaser = useActivityTeaser;
|
|
3134
3170
|
exports.useAddFeatureAllowlist = useAddFeatureAllowlist;
|
|
3135
3171
|
exports.useAddOrgNotificationEmail = useAddOrgNotificationEmail;
|
|
3172
|
+
exports.useAdminReviewQueues = useAdminReviewQueues;
|
|
3136
3173
|
exports.useAppAccountCheck = useAppAccountCheck;
|
|
3137
3174
|
exports.useAppsRegistry = useAppsRegistry;
|
|
3138
3175
|
exports.useAtFundLink = useAtFundLink;
|