@singi-labs/sifa-sdk 0.11.22 → 0.11.24
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/{adult-content-B6aagF8N.d.cts → adult-content-BaQjQsbN.d.cts} +78 -0
- package/dist/{adult-content-B6aagF8N.d.ts → adult-content-BaQjQsbN.d.ts} +78 -0
- package/dist/{feed-BaHtJXYR.d.cts → feed--omSiO_S.d.cts} +74 -1
- package/dist/{feed-BaHtJXYR.d.ts → feed--omSiO_S.d.ts} +74 -1
- package/dist/index-BV2QGy4u.d.ts +261 -0
- package/dist/index-C4UvwkKA.d.cts +261 -0
- package/dist/index-CHPSoiWb.d.cts +611 -0
- package/dist/index-Cw0Ows0u.d.ts +611 -0
- package/dist/index.cjs +56 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -7
- package/dist/index.d.ts +27 -7
- package/dist/index.js +53 -2
- package/dist/index.js.map +1 -1
- package/dist/{keys-D3urUnj8.d.cts → keys-BdLh1txD.d.cts} +2 -2
- package/dist/{keys-cT1ORNOu.d.ts → keys-Czq74eql.d.ts} +2 -2
- package/dist/query/fetchers/index.cjs +11 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +4 -247
- package/dist/query/fetchers/index.d.ts +4 -247
- package/dist/query/fetchers/index.js +11 -0
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +11 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +6 -558
- package/dist/query/hooks/index.d.ts +6 -558
- package/dist/query/hooks/index.js +11 -0
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +47 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +6 -6
- package/dist/query/index.d.ts +6 -6
- package/dist/query/index.js +44 -1
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.cjs +37 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +30 -397
- package/dist/schemas/index.d.ts +30 -397
- package/dist/schemas/index.js +32 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/shared-CHCY7Lst.d.cts +416 -0
- package/dist/shared-CHCY7Lst.d.ts +416 -0
- package/package.json +1 -1
package/dist/query/index.cjs
CHANGED
|
@@ -637,6 +637,17 @@ var EntitySelectResponseSchema = zod.z.object({
|
|
|
637
637
|
var EntityImportSearchResponseSchema = zod.z.object({
|
|
638
638
|
results: zod.z.array(EntitySearchResultSchema)
|
|
639
639
|
});
|
|
640
|
+
zod.z.object({
|
|
641
|
+
domain: zod.z.string().min(1).max(253)
|
|
642
|
+
});
|
|
643
|
+
var EntityResolveDomainResponseSchema = zod.z.object({
|
|
644
|
+
results: zod.z.array(EntitySearchResultSchema),
|
|
645
|
+
canMint: zod.z.boolean()
|
|
646
|
+
});
|
|
647
|
+
var EntityMintDomainResponseSchema = zod.z.object({
|
|
648
|
+
result: EntitySearchResultSchema,
|
|
649
|
+
pending: zod.z.boolean()
|
|
650
|
+
});
|
|
640
651
|
|
|
641
652
|
// src/query/fetchers/entities.ts
|
|
642
653
|
var EMPTY_SEARCH2 = { results: [], hasMore: false };
|
|
@@ -669,6 +680,24 @@ async function importSearchEntities(config, query, options = {}) {
|
|
|
669
680
|
});
|
|
670
681
|
return EntityImportSearchResponseSchema.parse(data).results;
|
|
671
682
|
}
|
|
683
|
+
async function resolveEntityDomain(config, domain, options = {}) {
|
|
684
|
+
const data = await apiFetch(config, "/api/entities/resolve-domain", {
|
|
685
|
+
method: "POST",
|
|
686
|
+
body: { domain },
|
|
687
|
+
credentials: "include",
|
|
688
|
+
...options
|
|
689
|
+
});
|
|
690
|
+
return EntityResolveDomainResponseSchema.parse(data);
|
|
691
|
+
}
|
|
692
|
+
async function mintEntityDomain(config, domain, options = {}) {
|
|
693
|
+
const data = await apiFetch(config, "/api/entities/mint-domain", {
|
|
694
|
+
method: "POST",
|
|
695
|
+
body: { domain },
|
|
696
|
+
credentials: "include",
|
|
697
|
+
...options
|
|
698
|
+
});
|
|
699
|
+
return EntityMintDomainResponseSchema.parse(data);
|
|
700
|
+
}
|
|
672
701
|
|
|
673
702
|
// src/query/fetchers/discovery.ts
|
|
674
703
|
async function fetchSimilarProfiles(config, did, opts = {}) {
|
|
@@ -2037,6 +2066,20 @@ function useImportSearchEntities(options) {
|
|
|
2037
2066
|
...options
|
|
2038
2067
|
});
|
|
2039
2068
|
}
|
|
2069
|
+
function useResolveEntityDomain(options) {
|
|
2070
|
+
const config = useSifaConfig();
|
|
2071
|
+
return reactQuery.useMutation({
|
|
2072
|
+
mutationFn: (domain) => resolveEntityDomain(config, domain),
|
|
2073
|
+
...options
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2076
|
+
function useMintEntityDomain(options) {
|
|
2077
|
+
const config = useSifaConfig();
|
|
2078
|
+
return reactQuery.useMutation({
|
|
2079
|
+
mutationFn: (domain) => mintEntityDomain(config, domain),
|
|
2080
|
+
...options
|
|
2081
|
+
});
|
|
2082
|
+
}
|
|
2040
2083
|
function useSimilarProfiles(did, opts = {}, options) {
|
|
2041
2084
|
const config = useSifaConfig();
|
|
2042
2085
|
const limit = opts.limit ?? 5;
|
|
@@ -2574,10 +2617,12 @@ exports.initiateNetworkMapGeneration = initiateNetworkMapGeneration;
|
|
|
2574
2617
|
exports.isNetworkMapResponse = isNetworkMapResponse;
|
|
2575
2618
|
exports.linkSkillToPosition = linkSkillToPosition;
|
|
2576
2619
|
exports.listFeatureAllowlist = listFeatureAllowlist;
|
|
2620
|
+
exports.mintEntityDomain = mintEntityDomain;
|
|
2577
2621
|
exports.refreshOrcidPublications = refreshOrcidPublications;
|
|
2578
2622
|
exports.refreshPds = refreshPds;
|
|
2579
2623
|
exports.removeFeatureAllowlist = removeFeatureAllowlist;
|
|
2580
2624
|
exports.resetProfile = resetProfile;
|
|
2625
|
+
exports.resolveEntityDomain = resolveEntityDomain;
|
|
2581
2626
|
exports.resolveQuotedPosts = resolveQuotedPosts;
|
|
2582
2627
|
exports.retractRoadmapVote = retractRoadmapVote;
|
|
2583
2628
|
exports.revealMarqueDomain = revealMarqueDomain;
|
|
@@ -2658,6 +2703,7 @@ exports.useHideSifaPublication = useHideSifaPublication;
|
|
|
2658
2703
|
exports.useHideStandardPublication = useHideStandardPublication;
|
|
2659
2704
|
exports.useImportSearchEntities = useImportSearchEntities;
|
|
2660
2705
|
exports.useLinkSkillToPosition = useLinkSkillToPosition;
|
|
2706
|
+
exports.useMintEntityDomain = useMintEntityDomain;
|
|
2661
2707
|
exports.useMutuals = useMutuals;
|
|
2662
2708
|
exports.useMyRoadmapVotes = useMyRoadmapVotes;
|
|
2663
2709
|
exports.useNetworkStreamCount = useNetworkStreamCount;
|
|
@@ -2667,6 +2713,7 @@ exports.useRefreshOrcidPublications = useRefreshOrcidPublications;
|
|
|
2667
2713
|
exports.useRefreshPds = useRefreshPds;
|
|
2668
2714
|
exports.useRemoveFeatureAllowlist = useRemoveFeatureAllowlist;
|
|
2669
2715
|
exports.useResetProfile = useResetProfile;
|
|
2716
|
+
exports.useResolveEntityDomain = useResolveEntityDomain;
|
|
2670
2717
|
exports.useRetractRoadmapVote = useRetractRoadmapVote;
|
|
2671
2718
|
exports.useRevealMarqueDomain = useRevealMarqueDomain;
|
|
2672
2719
|
exports.useRoadmapVotes = useRoadmapVotes;
|