@singi-labs/sifa-sdk 0.12.44 → 0.12.46
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-JKDlPIbL.d.cts → adult-content-9l3Xmixn.d.cts} +68 -2
- package/dist/{adult-content-JKDlPIbL.d.ts → adult-content-9l3Xmixn.d.ts} +68 -2
- package/dist/{feed-C8aHEPw4.d.cts → feed-dOSy_48Z.d.cts} +1 -1
- package/dist/{feed-C8aHEPw4.d.ts → feed-dOSy_48Z.d.ts} +1 -1
- package/dist/{index-DRSrcDoq.d.cts → index--Q8kEaBH.d.cts} +4 -4
- package/dist/{index-BzfWwovU.d.ts → index-Bq1mfC91.d.ts} +4 -4
- package/dist/{index-BFO1nfxZ.d.cts → index-Bvr6ZlZ1.d.cts} +31 -4
- package/dist/{index-C-k5JuRG.d.ts → index-Dvw2NPpk.d.ts} +31 -4
- package/dist/index.cjs +32 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +32 -7
- package/dist/index.js.map +1 -1
- package/dist/{org-Bijq3reg.d.ts → org-Bqu4G83p.d.ts} +94 -4
- package/dist/{org-D_0P4klw.d.cts → org-CNsjSfE4.d.cts} +94 -4
- package/dist/{profile-summary-CSmXD7ll.d.cts → profile-summary-BcWQzphy.d.cts} +1 -1
- package/dist/{profile-summary-C9E-HPeP.d.ts → profile-summary-DITGRCHe.d.ts} +1 -1
- package/dist/query/fetchers/index.cjs +35 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +5 -5
- package/dist/query/fetchers/index.d.ts +5 -5
- package/dist/query/fetchers/index.js +32 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +103 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +4 -4
- package/dist/query/hooks/index.d.ts +4 -4
- package/dist/query/hooks/index.js +100 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +105 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +8 -8
- package/dist/query/index.d.ts +8 -8
- package/dist/query/index.js +98 -1
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.cjs +31 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +20 -593
- package/dist/schemas/index.d.ts +20 -593
- package/dist/schemas/index.js +30 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/write/index.cjs +8 -0
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +9 -0
- package/dist/schemas/write/index.d.ts +9 -0
- package/dist/schemas/write/index.js +8 -0
- package/dist/schemas/write/index.js.map +1 -1
- package/dist/shared-CNr-iMpc.d.cts +614 -0
- package/dist/shared-CNr-iMpc.d.ts +614 -0
- package/package.json +1 -1
package/dist/query/index.cjs
CHANGED
|
@@ -465,6 +465,30 @@ function dismissEndorsement(config, data, options = {}) {
|
|
|
465
465
|
return apiWrite(config, "/api/endorsement/dismiss", "POST", { body: data, ...options });
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
+
// src/query/fetchers/confirmations.ts
|
|
469
|
+
async function fetchPendingConfirmations(config, options = {}) {
|
|
470
|
+
try {
|
|
471
|
+
const data = await apiFetch(config, "/api/confirmations/pending", {
|
|
472
|
+
cache: "no-store",
|
|
473
|
+
credentials: "include",
|
|
474
|
+
timeoutMs: 5e3,
|
|
475
|
+
...options
|
|
476
|
+
});
|
|
477
|
+
return { confirmations: data?.confirmations ?? [], cursor: data?.cursor };
|
|
478
|
+
} catch {
|
|
479
|
+
return { confirmations: [] };
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
function createConfirmation(config, data, options = {}) {
|
|
483
|
+
return apiWriteCreate(config, "/api/confirmation", data, options);
|
|
484
|
+
}
|
|
485
|
+
function dismissConfirmation(config, data, options = {}) {
|
|
486
|
+
return apiWrite(config, "/api/confirmation/dismiss", "POST", { body: data, ...options });
|
|
487
|
+
}
|
|
488
|
+
function revokeConfirmation(config, data, options = {}) {
|
|
489
|
+
return apiWrite(config, "/api/confirmation/revoke", "POST", { body: data, ...options });
|
|
490
|
+
}
|
|
491
|
+
|
|
468
492
|
// src/query/fetchers/actor.ts
|
|
469
493
|
async function fetchResolveActor(config, handleOrDid, options = {}) {
|
|
470
494
|
const q = handleOrDid.trim().replace(/^@/, "");
|
|
@@ -1445,6 +1469,13 @@ var sifaQueryKeys = {
|
|
|
1445
1469
|
// from the session cookie, so there is only ever one inbox per client.
|
|
1446
1470
|
pending: () => ["sifa", "endorsement", "pending"]
|
|
1447
1471
|
},
|
|
1472
|
+
confirmation: {
|
|
1473
|
+
all: () => ["sifa", "confirmation"],
|
|
1474
|
+
// Scoped to the session for the same reason as the endorsement inbox: the
|
|
1475
|
+
// AppView reads the subject from the session cookie, so there is only ever
|
|
1476
|
+
// one inbox per client.
|
|
1477
|
+
pending: () => ["sifa", "confirmation", "pending"]
|
|
1478
|
+
},
|
|
1448
1479
|
stream: {
|
|
1449
1480
|
all: () => ["sifa", "stream"],
|
|
1450
1481
|
networkCount: (did) => ["sifa", "stream", "network-count", did]
|
|
@@ -2053,6 +2084,72 @@ function useDismissEndorsement(options) {
|
|
|
2053
2084
|
...options
|
|
2054
2085
|
});
|
|
2055
2086
|
}
|
|
2087
|
+
function usePendingConfirmations(options) {
|
|
2088
|
+
const config = useSifaConfig();
|
|
2089
|
+
return reactQuery.useQuery({
|
|
2090
|
+
queryKey: sifaQueryKeys.confirmation.pending(),
|
|
2091
|
+
queryFn: () => fetchPendingConfirmations(config),
|
|
2092
|
+
...options
|
|
2093
|
+
});
|
|
2094
|
+
}
|
|
2095
|
+
function useCreateConfirmation(claimerHandleOrDid, options) {
|
|
2096
|
+
const config = useSifaConfig();
|
|
2097
|
+
const queryClient = reactQuery.useQueryClient();
|
|
2098
|
+
return reactQuery.useMutation({
|
|
2099
|
+
mutationFn: (data) => createConfirmation(config, data),
|
|
2100
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
2101
|
+
if (result.success) {
|
|
2102
|
+
await queryClient.invalidateQueries({
|
|
2103
|
+
queryKey: sifaQueryKeys.confirmation.pending()
|
|
2104
|
+
});
|
|
2105
|
+
if (claimerHandleOrDid) {
|
|
2106
|
+
await queryClient.invalidateQueries({
|
|
2107
|
+
queryKey: sifaQueryKeys.profile.byHandle(claimerHandleOrDid)
|
|
2108
|
+
});
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
2112
|
+
},
|
|
2113
|
+
...options
|
|
2114
|
+
});
|
|
2115
|
+
}
|
|
2116
|
+
function useDismissConfirmation(options) {
|
|
2117
|
+
const config = useSifaConfig();
|
|
2118
|
+
const queryClient = reactQuery.useQueryClient();
|
|
2119
|
+
return reactQuery.useMutation({
|
|
2120
|
+
mutationFn: (data) => dismissConfirmation(config, data),
|
|
2121
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
2122
|
+
if (result.success) {
|
|
2123
|
+
await queryClient.invalidateQueries({
|
|
2124
|
+
queryKey: sifaQueryKeys.confirmation.pending()
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
2128
|
+
},
|
|
2129
|
+
...options
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2132
|
+
function useRevokeConfirmation(claimerHandleOrDid, options) {
|
|
2133
|
+
const config = useSifaConfig();
|
|
2134
|
+
const queryClient = reactQuery.useQueryClient();
|
|
2135
|
+
return reactQuery.useMutation({
|
|
2136
|
+
mutationFn: (data) => revokeConfirmation(config, data),
|
|
2137
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
2138
|
+
if (result.success) {
|
|
2139
|
+
await queryClient.invalidateQueries({
|
|
2140
|
+
queryKey: sifaQueryKeys.confirmation.pending()
|
|
2141
|
+
});
|
|
2142
|
+
if (claimerHandleOrDid) {
|
|
2143
|
+
await queryClient.invalidateQueries({
|
|
2144
|
+
queryKey: sifaQueryKeys.profile.byHandle(claimerHandleOrDid)
|
|
2145
|
+
});
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
2149
|
+
},
|
|
2150
|
+
...options
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2056
2153
|
async function invalidateProfile6(queryClient, ownerHandleOrDid) {
|
|
2057
2154
|
await queryClient.invalidateQueries({
|
|
2058
2155
|
queryKey: sifaQueryKeys.profile.byHandle(ownerHandleOrDid)
|
|
@@ -2922,6 +3019,7 @@ exports.castRoadmapVote = castRoadmapVote;
|
|
|
2922
3019
|
exports.checkAppAccount = checkAppAccount;
|
|
2923
3020
|
exports.checkNetworkMapJobStatus = checkNetworkMapJobStatus;
|
|
2924
3021
|
exports.confirmEndorsement = confirmEndorsement;
|
|
3022
|
+
exports.createConfirmation = createConfirmation;
|
|
2925
3023
|
exports.createEducation = createEducation;
|
|
2926
3024
|
exports.createEndorsement = createEndorsement;
|
|
2927
3025
|
exports.createExternalAccount = createExternalAccount;
|
|
@@ -2939,6 +3037,7 @@ exports.deleteProfileLocation = deleteProfileLocation;
|
|
|
2939
3037
|
exports.deleteReaction = deleteReaction;
|
|
2940
3038
|
exports.deleteRecord = deleteRecord;
|
|
2941
3039
|
exports.deleteSkill = deleteSkill;
|
|
3040
|
+
exports.dismissConfirmation = dismissConfirmation;
|
|
2942
3041
|
exports.dismissEndorsement = dismissEndorsement;
|
|
2943
3042
|
exports.effectiveContentVisibility = effectiveContentVisibility;
|
|
2944
3043
|
exports.fetchActivityFeed = fetchActivityFeed;
|
|
@@ -2958,6 +3057,7 @@ exports.fetchMyGithubPullRequests = fetchMyGithubPullRequests;
|
|
|
2958
3057
|
exports.fetchMyRoadmapVotes = fetchMyRoadmapVotes;
|
|
2959
3058
|
exports.fetchNetworkMap = fetchNetworkMap;
|
|
2960
3059
|
exports.fetchNetworkStreamCount = fetchNetworkStreamCount;
|
|
3060
|
+
exports.fetchPendingConfirmations = fetchPendingConfirmations;
|
|
2961
3061
|
exports.fetchPendingEndorsements = fetchPendingEndorsements;
|
|
2962
3062
|
exports.fetchProfile = fetchProfile;
|
|
2963
3063
|
exports.fetchProfileSummary = fetchProfileSummary;
|
|
@@ -2999,6 +3099,7 @@ exports.resolveEntityDomain = resolveEntityDomain;
|
|
|
2999
3099
|
exports.resolveQuotedPosts = resolveQuotedPosts;
|
|
3000
3100
|
exports.retractRoadmapVote = retractRoadmapVote;
|
|
3001
3101
|
exports.revealMarqueDomain = revealMarqueDomain;
|
|
3102
|
+
exports.revokeConfirmation = revokeConfirmation;
|
|
3002
3103
|
exports.searchSkills = searchSkills;
|
|
3003
3104
|
exports.selectEntity = selectEntity;
|
|
3004
3105
|
exports.setExternalAccountPrimary = setExternalAccountPrimary;
|
|
@@ -3044,6 +3145,7 @@ exports.useBulkUnhideStandardPublications = useBulkUnhideStandardPublications;
|
|
|
3044
3145
|
exports.useCanonicalSkillSearch = useCanonicalSkillSearch;
|
|
3045
3146
|
exports.useCastRoadmapVote = useCastRoadmapVote;
|
|
3046
3147
|
exports.useConfirmEndorsement = useConfirmEndorsement;
|
|
3148
|
+
exports.useCreateConfirmation = useCreateConfirmation;
|
|
3047
3149
|
exports.useCreateEducation = useCreateEducation;
|
|
3048
3150
|
exports.useCreateEndorsement = useCreateEndorsement;
|
|
3049
3151
|
exports.useCreateExternalAccount = useCreateExternalAccount;
|
|
@@ -3062,6 +3164,7 @@ exports.useDeleteProfileLocation = useDeleteProfileLocation;
|
|
|
3062
3164
|
exports.useDeleteReaction = useDeleteReaction;
|
|
3063
3165
|
exports.useDeleteRecord = useDeleteRecord;
|
|
3064
3166
|
exports.useDeleteSkill = useDeleteSkill;
|
|
3167
|
+
exports.useDismissConfirmation = useDismissConfirmation;
|
|
3065
3168
|
exports.useDismissEndorsement = useDismissEndorsement;
|
|
3066
3169
|
exports.useEndorsementCount = useEndorsementCount;
|
|
3067
3170
|
exports.useEntitySearch = useEntitySearch;
|
|
@@ -3092,6 +3195,7 @@ exports.useOrgClaim = useOrgClaim;
|
|
|
3092
3195
|
exports.useOrgDomainChallenge = useOrgDomainChallenge;
|
|
3093
3196
|
exports.useOrgDomainVerify = useOrgDomainVerify;
|
|
3094
3197
|
exports.useOrgProfile = useOrgProfile;
|
|
3198
|
+
exports.usePendingConfirmations = usePendingConfirmations;
|
|
3095
3199
|
exports.usePendingEndorsements = usePendingEndorsements;
|
|
3096
3200
|
exports.useProfile = useProfile;
|
|
3097
3201
|
exports.useReactionStatus = useReactionStatus;
|
|
@@ -3103,6 +3207,7 @@ exports.useResetProfile = useResetProfile;
|
|
|
3103
3207
|
exports.useResolveEntityDomain = useResolveEntityDomain;
|
|
3104
3208
|
exports.useRetractRoadmapVote = useRetractRoadmapVote;
|
|
3105
3209
|
exports.useRevealMarqueDomain = useRevealMarqueDomain;
|
|
3210
|
+
exports.useRevokeConfirmation = useRevokeConfirmation;
|
|
3106
3211
|
exports.useRoadmapVotes = useRoadmapVotes;
|
|
3107
3212
|
exports.useSearchFilters = useSearchFilters;
|
|
3108
3213
|
exports.useSearchProfiles = useSearchProfiles;
|