@calimero-network/mero-js 26.6.0 → 26.7.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/admin-api/admin-client.d.ts +16 -2
- package/dist/admin-api/admin-client.js +18 -3
- package/dist/admin-api/admin-types.d.ts +8 -0
- package/dist/index.browser.mjs +1 -1
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +24 -3
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +24 -3
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2130,6 +2130,21 @@ var AdminApiClient = class {
|
|
|
2130
2130
|
}
|
|
2131
2131
|
return data;
|
|
2132
2132
|
}
|
|
2133
|
+
/**
|
|
2134
|
+
* Bring back a namespace the user removed from this node while the account
|
|
2135
|
+
* stayed a member (POST /admin-api/namespaces/:namespace_id/join, no
|
|
2136
|
+
* invitation). Such namespaces are the `forgotten` ones in
|
|
2137
|
+
* {@link listNamespacesForApplication}.
|
|
2138
|
+
*/
|
|
2139
|
+
async restoreNamespace(namespaceId) {
|
|
2140
|
+
return unwrap(
|
|
2141
|
+
await this.httpClient.post(
|
|
2142
|
+
`/admin-api/namespaces/${pathSegment(namespaceId)}/join`,
|
|
2143
|
+
{},
|
|
2144
|
+
{ timeoutMs: 65e3 }
|
|
2145
|
+
)
|
|
2146
|
+
);
|
|
2147
|
+
}
|
|
2133
2148
|
/**
|
|
2134
2149
|
* Join the namespace an invitation grants, and say what happened — including
|
|
2135
2150
|
* when the request failed but the join landed anyway.
|
|
@@ -2818,9 +2833,15 @@ var AdminApiClient = class {
|
|
|
2818
2833
|
async leaveContext(contextId) {
|
|
2819
2834
|
await this.httpClient.post(`/admin-api/contexts/${pathSegment(contextId)}/leave`, {});
|
|
2820
2835
|
}
|
|
2821
|
-
/**
|
|
2822
|
-
|
|
2823
|
-
|
|
2836
|
+
/**
|
|
2837
|
+
* Leave a namespace (POST /admin-api/namespaces/:namespace_id/leave).
|
|
2838
|
+
*
|
|
2839
|
+
* With `purge`, every device of the account also takes the namespace off its
|
|
2840
|
+
* disk. Core reads `purge` from the query string, so it is not in the body.
|
|
2841
|
+
*/
|
|
2842
|
+
async leaveNamespace(namespaceId, options = {}) {
|
|
2843
|
+
const query = options.purge ? "?purge=true" : "";
|
|
2844
|
+
await this.httpClient.post(`/admin-api/namespaces/${pathSegment(namespaceId)}/leave${query}`, {});
|
|
2824
2845
|
}
|
|
2825
2846
|
/** Issue a group ownership proof (POST /admin-api/groups/:group_id/issue-ownership-proof). */
|
|
2826
2847
|
async issueOwnershipProof(groupId, request) {
|