@singi-labs/sifa-sdk 0.12.3 → 0.12.4

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 (47) hide show
  1. package/dist/{adult-content-DDGP8W1e.d.cts → adult-content-n2uy3rT3.d.cts} +31 -1
  2. package/dist/{adult-content-DDGP8W1e.d.ts → adult-content-n2uy3rT3.d.ts} +31 -1
  3. package/dist/{index-IMvNS08M.d.ts → index-BLv2bK_K.d.ts} +2 -2
  4. package/dist/{index-BS7zO7KI.d.cts → index-COjgkXRe.d.cts} +86 -3
  5. package/dist/{index-CNh-GI9A.d.cts → index-HTTNUcN4.d.cts} +2 -2
  6. package/dist/{index-iAzeLOcz.d.ts → index-tkWmoZAu.d.ts} +86 -3
  7. package/dist/index.cjs +73 -1
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +96 -5
  10. package/dist/index.d.ts +96 -5
  11. package/dist/index.js +68 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/{keys-5oyp950_.d.ts → org-BZcAnLab.d.ts} +88 -2
  14. package/dist/{keys-Bn36IA8Q.d.cts → org-lIB6pSYc.d.cts} +88 -2
  15. package/dist/org-settings-CmaSX5ZI.d.cts +74 -0
  16. package/dist/org-settings-CmaSX5ZI.d.ts +74 -0
  17. package/dist/query/fetchers/index.cjs +45 -0
  18. package/dist/query/fetchers/index.cjs.map +1 -1
  19. package/dist/query/fetchers/index.d.cts +4 -3
  20. package/dist/query/fetchers/index.d.ts +4 -3
  21. package/dist/query/fetchers/index.js +40 -1
  22. package/dist/query/fetchers/index.js.map +1 -1
  23. package/dist/query/hooks/index.cjs +118 -0
  24. package/dist/query/hooks/index.cjs.map +1 -1
  25. package/dist/query/hooks/index.d.cts +4 -3
  26. package/dist/query/hooks/index.d.ts +4 -3
  27. package/dist/query/hooks/index.js +112 -1
  28. package/dist/query/hooks/index.js.map +1 -1
  29. package/dist/query/index.cjs +122 -0
  30. package/dist/query/index.cjs.map +1 -1
  31. package/dist/query/index.d.cts +6 -5
  32. package/dist/query/index.d.ts +6 -5
  33. package/dist/query/index.js +110 -1
  34. package/dist/query/index.js.map +1 -1
  35. package/dist/schemas/index.cjs +27 -0
  36. package/dist/schemas/index.cjs.map +1 -1
  37. package/dist/schemas/index.d.cts +67 -1
  38. package/dist/schemas/index.d.ts +67 -1
  39. package/dist/schemas/index.js +26 -1
  40. package/dist/schemas/index.js.map +1 -1
  41. package/dist/schemas/write/index.cjs +36 -0
  42. package/dist/schemas/write/index.cjs.map +1 -1
  43. package/dist/schemas/write/index.d.cts +1 -0
  44. package/dist/schemas/write/index.d.ts +1 -0
  45. package/dist/schemas/write/index.js +32 -1
  46. package/dist/schemas/write/index.js.map +1 -1
  47. package/package.json +1 -1
@@ -2540,12 +2540,122 @@ function useUpdateBskyContentLabelPrefs() {
2540
2540
  });
2541
2541
  }
2542
2542
 
2543
+ // src/query/fetchers/org.ts
2544
+ function submitOrgClaim(config, body, options = {}) {
2545
+ return apiWrite(config, "/api/org/claim", "POST", { body, ...options });
2546
+ }
2547
+ function updateOrgProfile(config, body, options = {}) {
2548
+ return apiWrite(config, "/api/org/profile", "PUT", {
2549
+ body,
2550
+ ...options
2551
+ });
2552
+ }
2553
+ function requestOrgDomainChallenge(config, body, options = {}) {
2554
+ return apiWrite(config, "/api/org/domains/challenge", "POST", {
2555
+ body,
2556
+ ...options
2557
+ });
2558
+ }
2559
+ function verifyOrgDomain(config, body, options = {}) {
2560
+ return apiWrite(config, "/api/org/domains/verify", "POST", {
2561
+ body,
2562
+ ...options
2563
+ });
2564
+ }
2565
+ function addOrgNotificationEmail(config, body, options = {}) {
2566
+ return apiWrite(
2567
+ config,
2568
+ "/api/org/notification-emails",
2569
+ "POST",
2570
+ { body, ...options }
2571
+ );
2572
+ }
2573
+ function removeOrgNotificationEmail(config, body, options = {}) {
2574
+ return apiWrite(
2575
+ config,
2576
+ "/api/org/notification-emails",
2577
+ "DELETE",
2578
+ { body, ...options }
2579
+ );
2580
+ }
2581
+ function useOrgProfile(handleOrDid, options) {
2582
+ const config = useSifaConfig();
2583
+ return reactQuery.useQuery({
2584
+ queryKey: sifaQueryKeys.profile.byHandle(handleOrDid ?? ""),
2585
+ queryFn: () => fetchProfile(config, handleOrDid ?? ""),
2586
+ enabled: Boolean(handleOrDid) && (options?.enabled ?? true),
2587
+ select: (profile) => profile?.org ?? null,
2588
+ ...options
2589
+ });
2590
+ }
2591
+ function useOrgClaim(handleOrDid, options) {
2592
+ const config = useSifaConfig();
2593
+ const queryClient = reactQuery.useQueryClient();
2594
+ return reactQuery.useMutation({
2595
+ mutationFn: (body) => submitOrgClaim(config, body),
2596
+ onSuccess: async (result, variables, onMutateResult, context) => {
2597
+ if (result.success && handleOrDid) {
2598
+ await queryClient.invalidateQueries({
2599
+ queryKey: sifaQueryKeys.profile.byHandle(handleOrDid)
2600
+ });
2601
+ }
2602
+ await options?.onSuccess?.(result, variables, onMutateResult, context);
2603
+ },
2604
+ ...options
2605
+ });
2606
+ }
2607
+ function useUpdateOrgProfile(handleOrDid, options) {
2608
+ const config = useSifaConfig();
2609
+ const queryClient = reactQuery.useQueryClient();
2610
+ return reactQuery.useMutation({
2611
+ mutationFn: (body) => updateOrgProfile(config, body),
2612
+ onSuccess: async (result, variables, onMutateResult, context) => {
2613
+ if (result.success && handleOrDid) {
2614
+ await queryClient.invalidateQueries({
2615
+ queryKey: sifaQueryKeys.profile.byHandle(handleOrDid)
2616
+ });
2617
+ }
2618
+ await options?.onSuccess?.(result, variables, onMutateResult, context);
2619
+ },
2620
+ ...options
2621
+ });
2622
+ }
2623
+ function useOrgDomainChallenge(options) {
2624
+ const config = useSifaConfig();
2625
+ return reactQuery.useMutation({
2626
+ mutationFn: (body) => requestOrgDomainChallenge(config, body),
2627
+ ...options
2628
+ });
2629
+ }
2630
+ function useOrgDomainVerify(options) {
2631
+ const config = useSifaConfig();
2632
+ return reactQuery.useMutation({
2633
+ mutationFn: (body) => verifyOrgDomain(config, body),
2634
+ ...options
2635
+ });
2636
+ }
2637
+ function useAddOrgNotificationEmail(options) {
2638
+ const config = useSifaConfig();
2639
+ return reactQuery.useMutation({
2640
+ mutationFn: (body) => addOrgNotificationEmail(config, body),
2641
+ ...options
2642
+ });
2643
+ }
2644
+ function useRemoveOrgNotificationEmail(options) {
2645
+ const config = useSifaConfig();
2646
+ return reactQuery.useMutation({
2647
+ mutationFn: (body) => removeOrgNotificationEmail(config, body),
2648
+ ...options
2649
+ });
2650
+ }
2651
+
2543
2652
  exports.ApiError = ApiError;
2544
2653
  exports.HIDDEN_ITEM_SOURCES = HIDDEN_ITEM_SOURCES;
2545
2654
  exports.HIDDEN_ITEM_TYPES = HIDDEN_ITEM_TYPES;
2546
2655
  exports.QUOTED_POSTS_BATCH_MAX = QUOTED_POSTS_BATCH_MAX;
2547
2656
  exports.SifaProvider = SifaProvider;
2548
2657
  exports.addFeatureAllowlist = addFeatureAllowlist;
2658
+ exports.addOrgNotificationEmail = addOrgNotificationEmail;
2549
2659
  exports.apiFetch = apiFetch;
2550
2660
  exports.apiFetchOrNull = apiFetchOrNull;
2551
2661
  exports.apiWrite = apiWrite;
@@ -2621,6 +2731,8 @@ exports.mintEntityDomain = mintEntityDomain;
2621
2731
  exports.refreshOrcidPublications = refreshOrcidPublications;
2622
2732
  exports.refreshPds = refreshPds;
2623
2733
  exports.removeFeatureAllowlist = removeFeatureAllowlist;
2734
+ exports.removeOrgNotificationEmail = removeOrgNotificationEmail;
2735
+ exports.requestOrgDomainChallenge = requestOrgDomainChallenge;
2624
2736
  exports.resetProfile = resetProfile;
2625
2737
  exports.resolveEntityDomain = resolveEntityDomain;
2626
2738
  exports.resolveQuotedPosts = resolveQuotedPosts;
@@ -2632,6 +2744,7 @@ exports.setExternalAccountPrimary = setExternalAccountPrimary;
2632
2744
  exports.setPositionPrimary = setPositionPrimary;
2633
2745
  exports.shouldGateAdultMedia = shouldGateAdultMedia;
2634
2746
  exports.sifaQueryKeys = sifaQueryKeys;
2747
+ exports.submitOrgClaim = submitOrgClaim;
2635
2748
  exports.unfollowUser = unfollowUser;
2636
2749
  exports.unhideKeytraceClaim = unhideKeytraceClaim;
2637
2750
  exports.unhideOrcidPublication = unhideOrcidPublication;
@@ -2645,6 +2758,7 @@ exports.unsetPositionPrimary = unsetPositionPrimary;
2645
2758
  exports.updateBskyContentLabelPrefs = updateBskyContentLabelPrefs;
2646
2759
  exports.updateEducation = updateEducation;
2647
2760
  exports.updateExternalAccount = updateExternalAccount;
2761
+ exports.updateOrgProfile = updateOrgProfile;
2648
2762
  exports.updatePosition = updatePosition;
2649
2763
  exports.updateProfileLocation = updateProfileLocation;
2650
2764
  exports.updateProfileOverride = updateProfileOverride;
@@ -2655,6 +2769,7 @@ exports.uploadAvatar = uploadAvatar;
2655
2769
  exports.useActivityFeed = useActivityFeed;
2656
2770
  exports.useActivityTeaser = useActivityTeaser;
2657
2771
  exports.useAddFeatureAllowlist = useAddFeatureAllowlist;
2772
+ exports.useAddOrgNotificationEmail = useAddOrgNotificationEmail;
2658
2773
  exports.useAppAccountCheck = useAppAccountCheck;
2659
2774
  exports.useAppsRegistry = useAppsRegistry;
2660
2775
  exports.useAtFundLink = useAtFundLink;
@@ -2707,11 +2822,16 @@ exports.useMintEntityDomain = useMintEntityDomain;
2707
2822
  exports.useMutuals = useMutuals;
2708
2823
  exports.useMyRoadmapVotes = useMyRoadmapVotes;
2709
2824
  exports.useNetworkStreamCount = useNetworkStreamCount;
2825
+ exports.useOrgClaim = useOrgClaim;
2826
+ exports.useOrgDomainChallenge = useOrgDomainChallenge;
2827
+ exports.useOrgDomainVerify = useOrgDomainVerify;
2828
+ exports.useOrgProfile = useOrgProfile;
2710
2829
  exports.useProfile = useProfile;
2711
2830
  exports.useReactionStatus = useReactionStatus;
2712
2831
  exports.useRefreshOrcidPublications = useRefreshOrcidPublications;
2713
2832
  exports.useRefreshPds = useRefreshPds;
2714
2833
  exports.useRemoveFeatureAllowlist = useRemoveFeatureAllowlist;
2834
+ exports.useRemoveOrgNotificationEmail = useRemoveOrgNotificationEmail;
2715
2835
  exports.useResetProfile = useResetProfile;
2716
2836
  exports.useResolveEntityDomain = useResolveEntityDomain;
2717
2837
  exports.useRetractRoadmapVote = useRetractRoadmapVote;
@@ -2741,6 +2861,7 @@ exports.useUnsetPositionPrimary = useUnsetPositionPrimary;
2741
2861
  exports.useUpdateBskyContentLabelPrefs = useUpdateBskyContentLabelPrefs;
2742
2862
  exports.useUpdateEducation = useUpdateEducation;
2743
2863
  exports.useUpdateExternalAccount = useUpdateExternalAccount;
2864
+ exports.useUpdateOrgProfile = useUpdateOrgProfile;
2744
2865
  exports.useUpdatePosition = useUpdatePosition;
2745
2866
  exports.useUpdateProfileLocation = useUpdateProfileLocation;
2746
2867
  exports.useUpdateProfileOverride = useUpdateProfileOverride;
@@ -2750,5 +2871,6 @@ exports.useUpdateSkill = useUpdateSkill;
2750
2871
  exports.useUploadAvatar = useUploadAvatar;
2751
2872
  exports.useVerifyExternalAccount = useVerifyExternalAccount;
2752
2873
  exports.verifyExternalAccount = verifyExternalAccount;
2874
+ exports.verifyOrgDomain = verifyOrgDomain;
2753
2875
  //# sourceMappingURL=index.cjs.map
2754
2876
  //# sourceMappingURL=index.cjs.map