@singi-labs/sifa-sdk 0.12.50 → 0.12.52

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 (49) hide show
  1. package/dist/{index-10rMsh0Y.d.cts → index-B-BExLL4.d.cts} +27 -3
  2. package/dist/{index-CxZBzRTC.d.cts → index-B1F632lI.d.cts} +3 -3
  3. package/dist/{index-KQD7YLsb.d.ts → index-BeiqwDak.d.ts} +27 -3
  4. package/dist/{index-CatO6M_Y.d.ts → index-D9_yFc0m.d.ts} +3 -3
  5. package/dist/index.cjs +218 -29
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +5 -5
  8. package/dist/index.d.ts +5 -5
  9. package/dist/index.js +216 -30
  10. package/dist/index.js.map +1 -1
  11. package/dist/{org-8ysVY69a.d.ts → org-lRzEl8je.d.ts} +51 -3
  12. package/dist/{org-Be0SH7dO.d.cts → org-xybLlTXW.d.cts} +51 -3
  13. package/dist/{profile-summary-DyX9EJzZ.d.ts → profile-summary-elBg0fG6.d.ts} +1 -1
  14. package/dist/{profile-summary-DReI-P0i.d.cts → profile-summary-jUtrgYrA.d.cts} +1 -1
  15. package/dist/query/fetchers/index.cjs +24 -0
  16. package/dist/query/fetchers/index.cjs.map +1 -1
  17. package/dist/query/fetchers/index.d.cts +4 -4
  18. package/dist/query/fetchers/index.d.ts +4 -4
  19. package/dist/query/fetchers/index.js +22 -1
  20. package/dist/query/fetchers/index.js.map +1 -1
  21. package/dist/query/hooks/index.cjs +44 -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 +43 -1
  26. package/dist/query/hooks/index.js.map +1 -1
  27. package/dist/query/index.cjs +48 -0
  28. package/dist/query/index.cjs.map +1 -1
  29. package/dist/query/index.d.cts +7 -7
  30. package/dist/query/index.d.ts +7 -7
  31. package/dist/query/index.js +44 -1
  32. package/dist/query/index.js.map +1 -1
  33. package/dist/schemas/index.cjs +32 -28
  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 +32 -28
  38. package/dist/schemas/index.js.map +1 -1
  39. package/dist/schemas/write/index.cjs +23 -17
  40. package/dist/schemas/write/index.cjs.map +1 -1
  41. package/dist/schemas/write/index.d.cts +9 -0
  42. package/dist/schemas/write/index.d.ts +9 -0
  43. package/dist/schemas/write/index.js +23 -17
  44. package/dist/schemas/write/index.js.map +1 -1
  45. package/dist/{shared-CqayM24g.d.cts → shared-B9ng04Kt.d.cts} +9 -0
  46. package/dist/{shared-CqayM24g.d.ts → shared-B9ng04Kt.d.ts} +9 -0
  47. package/dist/{adult-content-BUgP8bpf.d.cts → types-CmS4Argp.d.cts} +153 -1
  48. package/dist/{adult-content-BUgP8bpf.d.ts → types-CmS4Argp.d.ts} +153 -1
  49. package/package.json +1 -1
@@ -252,6 +252,10 @@ var sifaQueryKeys = {
252
252
  all: () => ["sifa", "bsky-preferences"],
253
253
  contentLabels: () => ["sifa", "bsky-preferences", "content-labels"]
254
254
  },
255
+ repoInventory: {
256
+ all: () => ["sifa", "repo-inventory"],
257
+ list: () => ["sifa", "repo-inventory", "list"]
258
+ },
255
259
  destructive: {
256
260
  all: () => ["sifa", "destructive"],
257
261
  wipePreview: () => ["sifa", "destructive", "wipe-preview"]
@@ -2578,6 +2582,44 @@ function useDeleteAccount(options) {
2578
2582
  ...options
2579
2583
  });
2580
2584
  }
2585
+
2586
+ // src/query/fetchers/repo-inventory.ts
2587
+ function fetchRepoInventory(config, options = {}) {
2588
+ return apiFetch(config, "/api/me/repo-inventory", {
2589
+ credentials: "include",
2590
+ ...options
2591
+ });
2592
+ }
2593
+ function deleteRepoRecords(config, input, options = {}) {
2594
+ return apiWrite(config, "/api/me/repo-delete", "POST", {
2595
+ body: input,
2596
+ ...options
2597
+ });
2598
+ }
2599
+
2600
+ // src/query/hooks/use-repo-inventory.ts
2601
+ function useRepoInventory(options) {
2602
+ const config = useSifaConfig();
2603
+ return reactQuery.useQuery({
2604
+ queryKey: sifaQueryKeys.repoInventory.list(),
2605
+ queryFn: () => fetchRepoInventory(config),
2606
+ staleTime: 0,
2607
+ gcTime: 0,
2608
+ ...options
2609
+ });
2610
+ }
2611
+ function useDeleteRepoRecords(options) {
2612
+ const config = useSifaConfig();
2613
+ const queryClient = reactQuery.useQueryClient();
2614
+ return reactQuery.useMutation({
2615
+ mutationFn: (input) => deleteRepoRecords(config, input),
2616
+ onSuccess: async (result, variables, onMutateResult, context) => {
2617
+ await queryClient.invalidateQueries({ queryKey: sifaQueryKeys.all() });
2618
+ await options?.onSuccess?.(result, variables, onMutateResult, context);
2619
+ },
2620
+ ...options
2621
+ });
2622
+ }
2581
2623
  var httpUrlNullable = zod.z.string().refine((s) => /^https?:\/\//i.test(s), { message: "must be an http(s) URL" }).nullable();
2582
2624
  var searchResultCommon = {
2583
2625
  kind: zod.z.string(),
@@ -2853,6 +2895,7 @@ exports.useDeletePosition = useDeletePosition;
2853
2895
  exports.useDeleteProfileLocation = useDeleteProfileLocation;
2854
2896
  exports.useDeleteReaction = useDeleteReaction;
2855
2897
  exports.useDeleteRecord = useDeleteRecord;
2898
+ exports.useDeleteRepoRecords = useDeleteRepoRecords;
2856
2899
  exports.useDeleteSkill = useDeleteSkill;
2857
2900
  exports.useDismissConfirmation = useDismissConfirmation;
2858
2901
  exports.useEndorsementCount = useEndorsementCount;
@@ -2891,6 +2934,7 @@ exports.useRefreshOrcidPublications = useRefreshOrcidPublications;
2891
2934
  exports.useRefreshPds = useRefreshPds;
2892
2935
  exports.useRemoveFeatureAllowlist = useRemoveFeatureAllowlist;
2893
2936
  exports.useRemoveOrgNotificationEmail = useRemoveOrgNotificationEmail;
2937
+ exports.useRepoInventory = useRepoInventory;
2894
2938
  exports.useResetProfile = useResetProfile;
2895
2939
  exports.useRetractRoadmapVote = useRetractRoadmapVote;
2896
2940
  exports.useRevealMarqueDomain = useRevealMarqueDomain;