@singi-labs/sifa-sdk 0.12.32 → 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/dist/{index-D4DUzpXJ.d.ts → index-CQiMQ3NO.d.ts} +12 -2
- package/dist/{index-CQx2Yk7v.d.ts → index-CtWYlM7v.d.ts} +2 -12
- package/dist/{index-XXLVtfGw.d.cts → index-D-Vlq0r4.d.cts} +12 -2
- package/dist/{index-DX-0n-2z.d.cts → index-DhO1kFRj.d.cts} +2 -12
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{org-5dARVOZ9.d.ts → org-BjiTIiWq.d.ts} +28 -1
- package/dist/{org-DOQL077g.d.cts → org-CcbXH1FW.d.cts} +28 -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.map +1 -1
- package/dist/query/hooks/index.cjs +25 -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 +25 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +26 -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 +25 -1
- package/dist/query/index.js.map +1 -1
- package/package.json +1 -1
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
|
}
|
|
@@ -1713,6 +1719,24 @@ function useUpdateSkill(ownerHandleOrDid, options) {
|
|
|
1713
1719
|
...options
|
|
1714
1720
|
});
|
|
1715
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
|
+
}
|
|
1716
1740
|
function useDeleteSkill(ownerHandleOrDid, options) {
|
|
1717
1741
|
const config = useSifaConfig();
|
|
1718
1742
|
const queryClient = reactQuery.useQueryClient();
|
|
@@ -2911,6 +2935,7 @@ exports.updateProfileOverride = updateProfileOverride;
|
|
|
2911
2935
|
exports.updateProfileSelf = updateProfileSelf;
|
|
2912
2936
|
exports.updateRecord = updateRecord;
|
|
2913
2937
|
exports.updateSkill = updateSkill;
|
|
2938
|
+
exports.updateSkillSubCategories = updateSkillSubCategories;
|
|
2914
2939
|
exports.uploadAvatar = uploadAvatar;
|
|
2915
2940
|
exports.useActivityFeed = useActivityFeed;
|
|
2916
2941
|
exports.useActivityTeaser = useActivityTeaser;
|
|
@@ -3016,6 +3041,7 @@ exports.useUpdateProfileOverride = useUpdateProfileOverride;
|
|
|
3016
3041
|
exports.useUpdateProfileSelf = useUpdateProfileSelf;
|
|
3017
3042
|
exports.useUpdateRecord = useUpdateRecord;
|
|
3018
3043
|
exports.useUpdateSkill = useUpdateSkill;
|
|
3044
|
+
exports.useUpdateSkillSubCategories = useUpdateSkillSubCategories;
|
|
3019
3045
|
exports.useUploadAvatar = useUploadAvatar;
|
|
3020
3046
|
exports.useVerifyExternalAccount = useVerifyExternalAccount;
|
|
3021
3047
|
exports.useWipePreview = useWipePreview;
|