@calimero-network/mero-react 2.6.1 → 3.0.0
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 +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2169,6 +2169,18 @@ function useUpgradeGroup() {
|
|
|
2169
2169
|
);
|
|
2170
2170
|
return { upgradeGroup, loading, error };
|
|
2171
2171
|
}
|
|
2172
|
+
function useResyncContext() {
|
|
2173
|
+
const { mero } = useMero();
|
|
2174
|
+
const { loading, error, run } = useAsyncMutation();
|
|
2175
|
+
const resyncContext = react.useCallback(
|
|
2176
|
+
async (contextId, request = {}) => {
|
|
2177
|
+
if (!mero) return null;
|
|
2178
|
+
return run(() => mero.admin.resyncContext(contextId, request));
|
|
2179
|
+
},
|
|
2180
|
+
[mero, run]
|
|
2181
|
+
);
|
|
2182
|
+
return { resyncContext, loading, error };
|
|
2183
|
+
}
|
|
2172
2184
|
function useGroupUpgradeStatus(groupId) {
|
|
2173
2185
|
const { mero } = useMero();
|
|
2174
2186
|
const [upgradeStatus, setUpgradeStatus] = react.useState(null);
|
|
@@ -2689,6 +2701,7 @@ exports.useNamespacesForApplication = useNamespacesForApplication;
|
|
|
2689
2701
|
exports.useNestGroup = useNestGroup;
|
|
2690
2702
|
exports.useRegisterGroupSigningKey = useRegisterGroupSigningKey;
|
|
2691
2703
|
exports.useRemoveGroupMembers = useRemoveGroupMembers;
|
|
2704
|
+
exports.useResyncContext = useResyncContext;
|
|
2692
2705
|
exports.useRetryGroupUpgrade = useRetryGroupUpgrade;
|
|
2693
2706
|
exports.useSetContextMetadata = useSetContextMetadata;
|
|
2694
2707
|
exports.useSetDefaultCapabilities = useSetDefaultCapabilities;
|