@singi-labs/sifa-sdk 0.12.31 → 0.12.33
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/README.md +1 -1
- package/dist/{index-ZoAKneCP.d.ts → index-CQiMQ3NO.d.ts} +21 -2
- package/dist/{index-CZAG8uku.d.ts → index-CtWYlM7v.d.ts} +2 -12
- package/dist/{index-C95t5Gg5.d.cts → index-D-Vlq0r4.d.cts} +21 -2
- package/dist/{index-O2oJHRq0.d.cts → index-DhO1kFRj.d.cts} +2 -12
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{org-Octhy3vS.d.ts → org-BjiTIiWq.d.ts} +59 -2
- package/dist/{org-DWAqK-TV.d.cts → org-CcbXH1FW.d.cts} +59 -2
- package/dist/query/fetchers/index.cjs +11 -0
- 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 +11 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +46 -0
- 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 +45 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +48 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +4 -4
- package/dist/query/index.d.ts +4 -4
- package/dist/query/index.js +45 -1
- package/dist/query/index.js.map +1 -1
- package/package.json +6 -6
package/dist/query/index.cjs
CHANGED
|
@@ -329,6 +329,12 @@ function updateSkill(config, rkey, data, options = {}) {
|
|
|
329
329
|
...options
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
|
+
function updateSkillSubCategories(config, rkeys, subCategory, options = {}) {
|
|
333
|
+
return apiWrite(config, "/api/profile/skills/subcategory", "POST", {
|
|
334
|
+
body: { rkeys, subCategory },
|
|
335
|
+
...options
|
|
336
|
+
});
|
|
337
|
+
}
|
|
332
338
|
function deleteSkill(config, rkey, options = {}) {
|
|
333
339
|
return apiWrite(config, `/api/profile/skill/${encodeURIComponent(rkey)}`, "DELETE", options);
|
|
334
340
|
}
|
|
@@ -1278,6 +1284,12 @@ function retractRoadmapVote(config, key, options = {}) {
|
|
|
1278
1284
|
}
|
|
1279
1285
|
|
|
1280
1286
|
// src/query/fetchers/destructive.ts
|
|
1287
|
+
function fetchWipePreview(config, options = {}) {
|
|
1288
|
+
return apiFetch(config, "/api/profile/wipe-preview", {
|
|
1289
|
+
credentials: "include",
|
|
1290
|
+
...options
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1281
1293
|
function resetProfile(config, deletePdsData, options = {}) {
|
|
1282
1294
|
return apiWrite(config, "/api/profile/reset", "DELETE", {
|
|
1283
1295
|
body: { deletePdsData },
|
|
@@ -1410,6 +1422,10 @@ var sifaQueryKeys = {
|
|
|
1410
1422
|
bskyPreferences: {
|
|
1411
1423
|
all: () => ["sifa", "bsky-preferences"],
|
|
1412
1424
|
contentLabels: () => ["sifa", "bsky-preferences", "content-labels"]
|
|
1425
|
+
},
|
|
1426
|
+
destructive: {
|
|
1427
|
+
all: () => ["sifa", "destructive"],
|
|
1428
|
+
wipePreview: () => ["sifa", "destructive", "wipe-preview"]
|
|
1413
1429
|
}
|
|
1414
1430
|
};
|
|
1415
1431
|
|
|
@@ -1703,6 +1719,24 @@ function useUpdateSkill(ownerHandleOrDid, options) {
|
|
|
1703
1719
|
...options
|
|
1704
1720
|
});
|
|
1705
1721
|
}
|
|
1722
|
+
function useUpdateSkillSubCategories(ownerHandleOrDid, options) {
|
|
1723
|
+
const config = useSifaConfig();
|
|
1724
|
+
const queryClient = reactQuery.useQueryClient();
|
|
1725
|
+
return reactQuery.useMutation({
|
|
1726
|
+
mutationFn: ({ rkeys, subCategory }) => updateSkillSubCategories(config, rkeys, subCategory),
|
|
1727
|
+
// `...options` comes first so a caller-supplied onSuccess cannot replace the
|
|
1728
|
+
// wrapper below and silently skip profile invalidation; the wrapper calls it
|
|
1729
|
+
// instead. The older skill hooks in this file spread options last and still
|
|
1730
|
+
// carry that bug.
|
|
1731
|
+
...options,
|
|
1732
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1733
|
+
if (result.success) {
|
|
1734
|
+
await invalidateProfile3(queryClient, ownerHandleOrDid);
|
|
1735
|
+
}
|
|
1736
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1706
1740
|
function useDeleteSkill(ownerHandleOrDid, options) {
|
|
1707
1741
|
const config = useSifaConfig();
|
|
1708
1742
|
const queryClient = reactQuery.useQueryClient();
|
|
@@ -2556,6 +2590,16 @@ function useRetractRoadmapVote(options) {
|
|
|
2556
2590
|
...options
|
|
2557
2591
|
});
|
|
2558
2592
|
}
|
|
2593
|
+
function useWipePreview(options) {
|
|
2594
|
+
const config = useSifaConfig();
|
|
2595
|
+
return reactQuery.useQuery({
|
|
2596
|
+
queryKey: sifaQueryKeys.destructive.wipePreview(),
|
|
2597
|
+
queryFn: () => fetchWipePreview(config),
|
|
2598
|
+
staleTime: 0,
|
|
2599
|
+
gcTime: 0,
|
|
2600
|
+
...options
|
|
2601
|
+
});
|
|
2602
|
+
}
|
|
2559
2603
|
function useResetProfile(options) {
|
|
2560
2604
|
const config = useSifaConfig();
|
|
2561
2605
|
const queryClient = reactQuery.useQueryClient();
|
|
@@ -2836,6 +2880,7 @@ exports.fetchSkillSuggestions = fetchSkillSuggestions;
|
|
|
2836
2880
|
exports.fetchStats = fetchStats;
|
|
2837
2881
|
exports.fetchSuggestionCount = fetchSuggestionCount;
|
|
2838
2882
|
exports.fetchSuggestions = fetchSuggestions;
|
|
2883
|
+
exports.fetchWipePreview = fetchWipePreview;
|
|
2839
2884
|
exports.followUser = followUser;
|
|
2840
2885
|
exports.getBlueskySuggestions = getBlueskySuggestions;
|
|
2841
2886
|
exports.getFollowers = getFollowers;
|
|
@@ -2890,6 +2935,7 @@ exports.updateProfileOverride = updateProfileOverride;
|
|
|
2890
2935
|
exports.updateProfileSelf = updateProfileSelf;
|
|
2891
2936
|
exports.updateRecord = updateRecord;
|
|
2892
2937
|
exports.updateSkill = updateSkill;
|
|
2938
|
+
exports.updateSkillSubCategories = updateSkillSubCategories;
|
|
2893
2939
|
exports.uploadAvatar = uploadAvatar;
|
|
2894
2940
|
exports.useActivityFeed = useActivityFeed;
|
|
2895
2941
|
exports.useActivityTeaser = useActivityTeaser;
|
|
@@ -2995,8 +3041,10 @@ exports.useUpdateProfileOverride = useUpdateProfileOverride;
|
|
|
2995
3041
|
exports.useUpdateProfileSelf = useUpdateProfileSelf;
|
|
2996
3042
|
exports.useUpdateRecord = useUpdateRecord;
|
|
2997
3043
|
exports.useUpdateSkill = useUpdateSkill;
|
|
3044
|
+
exports.useUpdateSkillSubCategories = useUpdateSkillSubCategories;
|
|
2998
3045
|
exports.useUploadAvatar = useUploadAvatar;
|
|
2999
3046
|
exports.useVerifyExternalAccount = useVerifyExternalAccount;
|
|
3047
|
+
exports.useWipePreview = useWipePreview;
|
|
3000
3048
|
exports.verifyExternalAccount = verifyExternalAccount;
|
|
3001
3049
|
exports.verifyOrgDomain = verifyOrgDomain;
|
|
3002
3050
|
//# sourceMappingURL=index.cjs.map
|