@singi-labs/sifa-sdk 0.10.16 → 0.10.17
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.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/query/fetchers/index.cjs +20 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +10 -1
- package/dist/query/fetchers/index.d.ts +10 -1
- package/dist/query/fetchers/index.js +19 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +60 -5
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +6 -1
- package/dist/query/hooks/index.d.ts +6 -1
- package/dist/query/hooks/index.js +59 -6
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +59 -4
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/query/index.js +56 -5
- package/dist/query/index.js.map +1 -1
- package/package.json +1 -1
package/dist/query/index.cjs
CHANGED
|
@@ -391,6 +391,24 @@ function unhideKeytraceClaim(config, rkey, options = {}) {
|
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
+
// src/query/fetchers/marque-domains.ts
|
|
395
|
+
function revealMarqueDomain(config, domain, options = {}) {
|
|
396
|
+
return apiWrite(
|
|
397
|
+
config,
|
|
398
|
+
`/api/profile/marque-domains/${encodeURIComponent(domain)}/reveal`,
|
|
399
|
+
"POST",
|
|
400
|
+
options
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
function unrevealMarqueDomain(config, domain, options = {}) {
|
|
404
|
+
return apiWrite(
|
|
405
|
+
config,
|
|
406
|
+
`/api/profile/marque-domains/${encodeURIComponent(domain)}/reveal`,
|
|
407
|
+
"DELETE",
|
|
408
|
+
options
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
|
|
394
412
|
// src/query/fetchers/publications.ts
|
|
395
413
|
function hideOrcidPublication(config, putCode, options = {}) {
|
|
396
414
|
return apiWrite(config, `/api/profile/orcid-publications/${putCode}/hide`, "POST", options);
|
|
@@ -1691,6 +1709,39 @@ async function invalidateProfile7(queryClient, ownerHandleOrDid) {
|
|
|
1691
1709
|
queryKey: sifaQueryKeys.profile.byHandle(ownerHandleOrDid)
|
|
1692
1710
|
});
|
|
1693
1711
|
}
|
|
1712
|
+
function useRevealMarqueDomain(ownerHandleOrDid, options) {
|
|
1713
|
+
const config = useSifaConfig();
|
|
1714
|
+
const queryClient = reactQuery.useQueryClient();
|
|
1715
|
+
return reactQuery.useMutation({
|
|
1716
|
+
mutationFn: (domain) => revealMarqueDomain(config, domain),
|
|
1717
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1718
|
+
if (result.success) {
|
|
1719
|
+
await invalidateProfile7(queryClient, ownerHandleOrDid);
|
|
1720
|
+
}
|
|
1721
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1722
|
+
},
|
|
1723
|
+
...options
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
function useUnrevealMarqueDomain(ownerHandleOrDid, options) {
|
|
1727
|
+
const config = useSifaConfig();
|
|
1728
|
+
const queryClient = reactQuery.useQueryClient();
|
|
1729
|
+
return reactQuery.useMutation({
|
|
1730
|
+
mutationFn: (domain) => unrevealMarqueDomain(config, domain),
|
|
1731
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1732
|
+
if (result.success) {
|
|
1733
|
+
await invalidateProfile7(queryClient, ownerHandleOrDid);
|
|
1734
|
+
}
|
|
1735
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1736
|
+
},
|
|
1737
|
+
...options
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
async function invalidateProfile8(queryClient, ownerHandleOrDid) {
|
|
1741
|
+
await queryClient.invalidateQueries({
|
|
1742
|
+
queryKey: sifaQueryKeys.profile.byHandle(ownerHandleOrDid)
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1694
1745
|
function makeWriteHook(fetcher) {
|
|
1695
1746
|
return function useHook(ownerHandleOrDid, options) {
|
|
1696
1747
|
const config = useSifaConfig();
|
|
@@ -1699,7 +1750,7 @@ function makeWriteHook(fetcher) {
|
|
|
1699
1750
|
mutationFn: (v) => fetcher(config, v),
|
|
1700
1751
|
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1701
1752
|
if (result.success) {
|
|
1702
|
-
await
|
|
1753
|
+
await invalidateProfile8(queryClient, ownerHandleOrDid);
|
|
1703
1754
|
}
|
|
1704
1755
|
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1705
1756
|
},
|
|
@@ -1738,14 +1789,14 @@ function useRefreshOrcidPublications(ownerHandleOrDid, options) {
|
|
|
1738
1789
|
mutationFn: () => refreshOrcidPublications(config),
|
|
1739
1790
|
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1740
1791
|
if (result.success) {
|
|
1741
|
-
await
|
|
1792
|
+
await invalidateProfile8(queryClient, ownerHandleOrDid);
|
|
1742
1793
|
}
|
|
1743
1794
|
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1744
1795
|
},
|
|
1745
1796
|
...options
|
|
1746
1797
|
});
|
|
1747
1798
|
}
|
|
1748
|
-
async function
|
|
1799
|
+
async function invalidateProfile9(queryClient, ownerHandleOrDid) {
|
|
1749
1800
|
await queryClient.invalidateQueries({
|
|
1750
1801
|
queryKey: sifaQueryKeys.profile.byHandle(ownerHandleOrDid)
|
|
1751
1802
|
});
|
|
@@ -1758,7 +1809,7 @@ function makeWriteHook2(fetcher) {
|
|
|
1758
1809
|
mutationFn: (v) => fetcher(config, v),
|
|
1759
1810
|
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1760
1811
|
if (result.success) {
|
|
1761
|
-
await
|
|
1812
|
+
await invalidateProfile9(queryClient, ownerHandleOrDid);
|
|
1762
1813
|
}
|
|
1763
1814
|
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1764
1815
|
},
|
|
@@ -2376,6 +2427,7 @@ exports.removeFeatureAllowlist = removeFeatureAllowlist;
|
|
|
2376
2427
|
exports.resetProfile = resetProfile;
|
|
2377
2428
|
exports.resolveQuotedPosts = resolveQuotedPosts;
|
|
2378
2429
|
exports.retractRoadmapVote = retractRoadmapVote;
|
|
2430
|
+
exports.revealMarqueDomain = revealMarqueDomain;
|
|
2379
2431
|
exports.searchSkills = searchSkills;
|
|
2380
2432
|
exports.setExternalAccountPrimary = setExternalAccountPrimary;
|
|
2381
2433
|
exports.setPositionPrimary = setPositionPrimary;
|
|
@@ -2388,6 +2440,7 @@ exports.unhideProfileItem = unhideProfileItem;
|
|
|
2388
2440
|
exports.unhideSifaPublication = unhideSifaPublication;
|
|
2389
2441
|
exports.unhideStandardPublication = unhideStandardPublication;
|
|
2390
2442
|
exports.unlinkSkillFromPosition = unlinkSkillFromPosition;
|
|
2443
|
+
exports.unrevealMarqueDomain = unrevealMarqueDomain;
|
|
2391
2444
|
exports.unsetExternalAccountPrimary = unsetExternalAccountPrimary;
|
|
2392
2445
|
exports.unsetPositionPrimary = unsetPositionPrimary;
|
|
2393
2446
|
exports.updateBskyContentLabelPrefs = updateBskyContentLabelPrefs;
|
|
@@ -2458,6 +2511,7 @@ exports.useRefreshPds = useRefreshPds;
|
|
|
2458
2511
|
exports.useRemoveFeatureAllowlist = useRemoveFeatureAllowlist;
|
|
2459
2512
|
exports.useResetProfile = useResetProfile;
|
|
2460
2513
|
exports.useRetractRoadmapVote = useRetractRoadmapVote;
|
|
2514
|
+
exports.useRevealMarqueDomain = useRevealMarqueDomain;
|
|
2461
2515
|
exports.useRoadmapVotes = useRoadmapVotes;
|
|
2462
2516
|
exports.useSearchFilters = useSearchFilters;
|
|
2463
2517
|
exports.useSearchProfiles = useSearchProfiles;
|
|
@@ -2476,6 +2530,7 @@ exports.useUnhideProfileItem = useUnhideProfileItem;
|
|
|
2476
2530
|
exports.useUnhideSifaPublication = useUnhideSifaPublication;
|
|
2477
2531
|
exports.useUnhideStandardPublication = useUnhideStandardPublication;
|
|
2478
2532
|
exports.useUnlinkSkillFromPosition = useUnlinkSkillFromPosition;
|
|
2533
|
+
exports.useUnrevealMarqueDomain = useUnrevealMarqueDomain;
|
|
2479
2534
|
exports.useUnsetExternalAccountPrimary = useUnsetExternalAccountPrimary;
|
|
2480
2535
|
exports.useUnsetPositionPrimary = useUnsetPositionPrimary;
|
|
2481
2536
|
exports.useUpdateBskyContentLabelPrefs = useUpdateBskyContentLabelPrefs;
|