@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
|
@@ -196,7 +196,8 @@ var sifaQueryKeys = {
|
|
|
196
196
|
},
|
|
197
197
|
admin: {
|
|
198
198
|
all: () => ["sifa", "admin"],
|
|
199
|
-
featureAllowlist: (flag) => ["sifa", "admin", "feature-allowlist", flag]
|
|
199
|
+
featureAllowlist: (flag) => ["sifa", "admin", "feature-allowlist", flag],
|
|
200
|
+
reviewQueues: () => ["sifa", "admin", "review-queues"]
|
|
200
201
|
},
|
|
201
202
|
stats: {
|
|
202
203
|
all: () => ["sifa", "stats"],
|
|
@@ -2021,6 +2022,42 @@ function useRemoveFeatureAllowlist(flag, options) {
|
|
|
2021
2022
|
);
|
|
2022
2023
|
}
|
|
2023
2024
|
|
|
2025
|
+
// src/query/fetchers/admin-review-queues.ts
|
|
2026
|
+
async function getAdminReviewQueues(config, opts = {}) {
|
|
2027
|
+
const headers = { ...opts.headers ?? {} };
|
|
2028
|
+
if (opts.cookieHeader) headers.cookie = opts.cookieHeader;
|
|
2029
|
+
const res = await apiFetch(config, "/api/admin/stats/review-queues", {
|
|
2030
|
+
credentials: "include",
|
|
2031
|
+
cache: "no-store",
|
|
2032
|
+
...opts,
|
|
2033
|
+
headers
|
|
2034
|
+
});
|
|
2035
|
+
const ideas = res.ideas ?? 0;
|
|
2036
|
+
const nameCorrections = res.nameCorrections ?? 0;
|
|
2037
|
+
const pendingCompanies = res.pendingCompanies ?? 0;
|
|
2038
|
+
return {
|
|
2039
|
+
ideas,
|
|
2040
|
+
nameCorrections,
|
|
2041
|
+
pendingCompanies,
|
|
2042
|
+
// Derived rather than trusted so an API that predates the field still
|
|
2043
|
+
// yields a usable pill count.
|
|
2044
|
+
total: res.total ?? ideas + nameCorrections + pendingCompanies,
|
|
2045
|
+
generatedAt: res.generatedAt ?? ""
|
|
2046
|
+
};
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
// src/query/hooks/use-admin-review-queues.ts
|
|
2050
|
+
var REVIEW_QUEUES_STALE_TIME_MS = 6e4;
|
|
2051
|
+
function useAdminReviewQueues(options) {
|
|
2052
|
+
const config = useSifaConfig();
|
|
2053
|
+
return reactQuery.useQuery({
|
|
2054
|
+
queryKey: sifaQueryKeys.admin.reviewQueues(),
|
|
2055
|
+
queryFn: () => getAdminReviewQueues(config),
|
|
2056
|
+
staleTime: REVIEW_QUEUES_STALE_TIME_MS,
|
|
2057
|
+
...options
|
|
2058
|
+
});
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2024
2061
|
// src/query/fetchers/activity.ts
|
|
2025
2062
|
async function fetchHeatmapData(config, handleOrDid, days, options = {}) {
|
|
2026
2063
|
const path = `/api/activity/${encodeIdentifier(handleOrDid)}/heatmap?days=${days}`;
|
|
@@ -2762,6 +2799,7 @@ exports.useActivityFeed = useActivityFeed;
|
|
|
2762
2799
|
exports.useActivityTeaser = useActivityTeaser;
|
|
2763
2800
|
exports.useAddFeatureAllowlist = useAddFeatureAllowlist;
|
|
2764
2801
|
exports.useAddOrgNotificationEmail = useAddOrgNotificationEmail;
|
|
2802
|
+
exports.useAdminReviewQueues = useAdminReviewQueues;
|
|
2765
2803
|
exports.useAppAccountCheck = useAppAccountCheck;
|
|
2766
2804
|
exports.useAppsRegistry = useAppsRegistry;
|
|
2767
2805
|
exports.useAtFundLink = useAtFundLink;
|