@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
|
@@ -1033,6 +1033,59 @@ function useUnhideKeytraceClaim(ownerHandleOrDid, options) {
|
|
|
1033
1033
|
});
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
|
+
// src/query/fetchers/marque-domains.ts
|
|
1037
|
+
function revealMarqueDomain(config, domain, options = {}) {
|
|
1038
|
+
return apiWrite(
|
|
1039
|
+
config,
|
|
1040
|
+
`/api/profile/marque-domains/${encodeURIComponent(domain)}/reveal`,
|
|
1041
|
+
"POST",
|
|
1042
|
+
options
|
|
1043
|
+
);
|
|
1044
|
+
}
|
|
1045
|
+
function unrevealMarqueDomain(config, domain, options = {}) {
|
|
1046
|
+
return apiWrite(
|
|
1047
|
+
config,
|
|
1048
|
+
`/api/profile/marque-domains/${encodeURIComponent(domain)}/reveal`,
|
|
1049
|
+
"DELETE",
|
|
1050
|
+
options
|
|
1051
|
+
);
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
// src/query/hooks/use-marque-domains.ts
|
|
1055
|
+
async function invalidateProfile7(queryClient, ownerHandleOrDid) {
|
|
1056
|
+
await queryClient.invalidateQueries({
|
|
1057
|
+
queryKey: sifaQueryKeys.profile.byHandle(ownerHandleOrDid)
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
function useRevealMarqueDomain(ownerHandleOrDid, options) {
|
|
1061
|
+
const config = useSifaConfig();
|
|
1062
|
+
const queryClient = reactQuery.useQueryClient();
|
|
1063
|
+
return reactQuery.useMutation({
|
|
1064
|
+
mutationFn: (domain) => revealMarqueDomain(config, domain),
|
|
1065
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1066
|
+
if (result.success) {
|
|
1067
|
+
await invalidateProfile7(queryClient, ownerHandleOrDid);
|
|
1068
|
+
}
|
|
1069
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1070
|
+
},
|
|
1071
|
+
...options
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
function useUnrevealMarqueDomain(ownerHandleOrDid, options) {
|
|
1075
|
+
const config = useSifaConfig();
|
|
1076
|
+
const queryClient = reactQuery.useQueryClient();
|
|
1077
|
+
return reactQuery.useMutation({
|
|
1078
|
+
mutationFn: (domain) => unrevealMarqueDomain(config, domain),
|
|
1079
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1080
|
+
if (result.success) {
|
|
1081
|
+
await invalidateProfile7(queryClient, ownerHandleOrDid);
|
|
1082
|
+
}
|
|
1083
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1084
|
+
},
|
|
1085
|
+
...options
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1036
1089
|
// src/query/fetchers/publications.ts
|
|
1037
1090
|
function hideOrcidPublication(config, putCode, options = {}) {
|
|
1038
1091
|
return apiWrite(config, `/api/profile/orcid-publications/${putCode}/hide`, "POST", options);
|
|
@@ -1088,7 +1141,7 @@ async function refreshOrcidPublications(config, options = {}) {
|
|
|
1088
1141
|
}
|
|
1089
1142
|
|
|
1090
1143
|
// src/query/hooks/use-publication-mutations.ts
|
|
1091
|
-
async function
|
|
1144
|
+
async function invalidateProfile8(queryClient, ownerHandleOrDid) {
|
|
1092
1145
|
await queryClient.invalidateQueries({
|
|
1093
1146
|
queryKey: sifaQueryKeys.profile.byHandle(ownerHandleOrDid)
|
|
1094
1147
|
});
|
|
@@ -1101,7 +1154,7 @@ function makeWriteHook(fetcher) {
|
|
|
1101
1154
|
mutationFn: (v) => fetcher(config, v),
|
|
1102
1155
|
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1103
1156
|
if (result.success) {
|
|
1104
|
-
await
|
|
1157
|
+
await invalidateProfile8(queryClient, ownerHandleOrDid);
|
|
1105
1158
|
}
|
|
1106
1159
|
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1107
1160
|
},
|
|
@@ -1140,7 +1193,7 @@ function useRefreshOrcidPublications(ownerHandleOrDid, options) {
|
|
|
1140
1193
|
mutationFn: () => refreshOrcidPublications(config),
|
|
1141
1194
|
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1142
1195
|
if (result.success) {
|
|
1143
|
-
await
|
|
1196
|
+
await invalidateProfile8(queryClient, ownerHandleOrDid);
|
|
1144
1197
|
}
|
|
1145
1198
|
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1146
1199
|
},
|
|
@@ -1163,7 +1216,7 @@ function bulkUnhideProfileItems(config, input, options = {}) {
|
|
|
1163
1216
|
}
|
|
1164
1217
|
|
|
1165
1218
|
// src/query/hooks/use-profile-items-hide.ts
|
|
1166
|
-
async function
|
|
1219
|
+
async function invalidateProfile9(queryClient, ownerHandleOrDid) {
|
|
1167
1220
|
await queryClient.invalidateQueries({
|
|
1168
1221
|
queryKey: sifaQueryKeys.profile.byHandle(ownerHandleOrDid)
|
|
1169
1222
|
});
|
|
@@ -1176,7 +1229,7 @@ function makeWriteHook2(fetcher) {
|
|
|
1176
1229
|
mutationFn: (v) => fetcher(config, v),
|
|
1177
1230
|
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1178
1231
|
if (result.success) {
|
|
1179
|
-
await
|
|
1232
|
+
await invalidateProfile9(queryClient, ownerHandleOrDid);
|
|
1180
1233
|
}
|
|
1181
1234
|
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1182
1235
|
},
|
|
@@ -2251,6 +2304,7 @@ exports.useRefreshPds = useRefreshPds;
|
|
|
2251
2304
|
exports.useRemoveFeatureAllowlist = useRemoveFeatureAllowlist;
|
|
2252
2305
|
exports.useResetProfile = useResetProfile;
|
|
2253
2306
|
exports.useRetractRoadmapVote = useRetractRoadmapVote;
|
|
2307
|
+
exports.useRevealMarqueDomain = useRevealMarqueDomain;
|
|
2254
2308
|
exports.useRoadmapVotes = useRoadmapVotes;
|
|
2255
2309
|
exports.useSearchFilters = useSearchFilters;
|
|
2256
2310
|
exports.useSearchProfiles = useSearchProfiles;
|
|
@@ -2269,6 +2323,7 @@ exports.useUnhideProfileItem = useUnhideProfileItem;
|
|
|
2269
2323
|
exports.useUnhideSifaPublication = useUnhideSifaPublication;
|
|
2270
2324
|
exports.useUnhideStandardPublication = useUnhideStandardPublication;
|
|
2271
2325
|
exports.useUnlinkSkillFromPosition = useUnlinkSkillFromPosition;
|
|
2326
|
+
exports.useUnrevealMarqueDomain = useUnrevealMarqueDomain;
|
|
2272
2327
|
exports.useUnsetExternalAccountPrimary = useUnsetExternalAccountPrimary;
|
|
2273
2328
|
exports.useUnsetPositionPrimary = useUnsetPositionPrimary;
|
|
2274
2329
|
exports.useUpdateEducation = useUpdateEducation;
|