@singi-labs/sifa-sdk 0.12.32 → 0.12.34

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.
Files changed (39) hide show
  1. package/dist/{feed-D2ZV8Eaj.d.cts → feed-C8aHEPw4.d.cts} +5 -0
  2. package/dist/{feed-D2ZV8Eaj.d.ts → feed-C8aHEPw4.d.ts} +5 -0
  3. package/dist/{index-CQx2Yk7v.d.ts → index-Bf_BI0TG.d.ts} +3 -13
  4. package/dist/{index-D4DUzpXJ.d.ts → index-CBx6UJvX.d.ts} +15 -3
  5. package/dist/{index-DX-0n-2z.d.cts → index-CEoJMzkP.d.cts} +3 -13
  6. package/dist/{index-XXLVtfGw.d.cts → index-DMN5tQBL.d.cts} +15 -3
  7. package/dist/index.cjs +9 -1
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +2 -2
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +9 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/{org-5dARVOZ9.d.ts → org-C8LR9MpF.d.ts} +29 -2
  14. package/dist/{org-DOQL077g.d.cts → org-OFRiuRqU.d.cts} +29 -2
  15. package/dist/query/fetchers/index.cjs +8 -0
  16. package/dist/query/fetchers/index.cjs.map +1 -1
  17. package/dist/query/fetchers/index.d.cts +3 -3
  18. package/dist/query/fetchers/index.d.ts +3 -3
  19. package/dist/query/fetchers/index.js +8 -0
  20. package/dist/query/fetchers/index.js.map +1 -1
  21. package/dist/query/hooks/index.cjs +33 -0
  22. package/dist/query/hooks/index.cjs.map +1 -1
  23. package/dist/query/hooks/index.d.cts +3 -3
  24. package/dist/query/hooks/index.d.ts +3 -3
  25. package/dist/query/hooks/index.js +33 -1
  26. package/dist/query/hooks/index.js.map +1 -1
  27. package/dist/query/index.cjs +34 -0
  28. package/dist/query/index.cjs.map +1 -1
  29. package/dist/query/index.d.cts +5 -5
  30. package/dist/query/index.d.ts +5 -5
  31. package/dist/query/index.js +33 -1
  32. package/dist/query/index.js.map +1 -1
  33. package/dist/schemas/index.cjs +8 -0
  34. package/dist/schemas/index.cjs.map +1 -1
  35. package/dist/schemas/index.d.cts +1 -1
  36. package/dist/schemas/index.d.ts +1 -1
  37. package/dist/schemas/index.js +8 -0
  38. package/dist/schemas/index.js.map +1 -1
  39. package/package.json +1 -1
@@ -653,6 +653,12 @@ function updateSkill(config, rkey, data, options = {}) {
653
653
  ...options
654
654
  });
655
655
  }
656
+ function updateSkillSubCategories(config, rkeys, subCategory, options = {}) {
657
+ return apiWrite(config, "/api/profile/skills/subcategory", "POST", {
658
+ body: { rkeys, subCategory },
659
+ ...options
660
+ });
661
+ }
656
662
  function deleteSkill(config, rkey, options = {}) {
657
663
  return apiWrite(config, `/api/profile/skill/${encodeURIComponent(rkey)}`, "DELETE", options);
658
664
  }
@@ -691,6 +697,24 @@ function useUpdateSkill(ownerHandleOrDid, options) {
691
697
  ...options
692
698
  });
693
699
  }
700
+ function useUpdateSkillSubCategories(ownerHandleOrDid, options) {
701
+ const config = useSifaConfig();
702
+ const queryClient = reactQuery.useQueryClient();
703
+ return reactQuery.useMutation({
704
+ mutationFn: ({ rkeys, subCategory }) => updateSkillSubCategories(config, rkeys, subCategory),
705
+ // `...options` comes first so a caller-supplied onSuccess cannot replace the
706
+ // wrapper below and silently skip profile invalidation; the wrapper calls it
707
+ // instead. The older skill hooks in this file spread options last and still
708
+ // carry that bug.
709
+ ...options,
710
+ onSuccess: async (result, variables, onMutateResult, context) => {
711
+ if (result.success) {
712
+ await invalidateProfile3(queryClient, ownerHandleOrDid);
713
+ }
714
+ await options?.onSuccess?.(result, variables, onMutateResult, context);
715
+ }
716
+ });
717
+ }
694
718
  function useDeleteSkill(ownerHandleOrDid, options) {
695
719
  const config = useSifaConfig();
696
720
  const queryClient = reactQuery.useQueryClient();
@@ -2424,6 +2448,14 @@ var EntitySelectResponseSchema = zod.z.object({
2424
2448
  kind: zod.z.string(),
2425
2449
  canonicalName: zod.z.string(),
2426
2450
  domain: zod.z.string().nullable(),
2451
+ /**
2452
+ * The entity's website, gated to sources trustworthy enough to prefill into a
2453
+ * record the user signs. Narrower than `domain`, which is a display value and
2454
+ * may come from a crawl. Null when the entity has no such source.
2455
+ */
2456
+ website: httpUrlNullable.default(null),
2457
+ /** Which tier `website` came from. Crawled is never an accepted source. */
2458
+ websiteTier: zod.z.enum(["org", "curated"]).nullable().default(null),
2427
2459
  entityRef: httpUrlNullable
2428
2460
  });
2429
2461
  var EntityImportSearchResponseSchema = zod.z.object({
@@ -2721,6 +2753,7 @@ exports.useUpdateProfileOverride = useUpdateProfileOverride;
2721
2753
  exports.useUpdateProfileSelf = useUpdateProfileSelf;
2722
2754
  exports.useUpdateRecord = useUpdateRecord;
2723
2755
  exports.useUpdateSkill = useUpdateSkill;
2756
+ exports.useUpdateSkillSubCategories = useUpdateSkillSubCategories;
2724
2757
  exports.useUploadAvatar = useUploadAvatar;
2725
2758
  exports.useVerifyExternalAccount = useVerifyExternalAccount;
2726
2759
  exports.useWipePreview = useWipePreview;