@calimero-network/mero-js 26.9.1 → 26.11.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 +11 -1
- package/dist/admin-api/admin-client.js +19 -0
- package/dist/admin-api/admin-types.d.ts +50 -0
- package/dist/index.browser.mjs +1 -1
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +27 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +27 -0
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1823,6 +1823,28 @@ var AdminApiClient = class {
|
|
|
1823
1823
|
await this.httpClient.post("/admin-api/namespaces", request)
|
|
1824
1824
|
);
|
|
1825
1825
|
}
|
|
1826
|
+
/** What `namespaceId` approves for outbound requests, one entry per publisher. */
|
|
1827
|
+
async listOutboundApprovals(namespaceId) {
|
|
1828
|
+
return unwrap(
|
|
1829
|
+
await this.httpClient.get(
|
|
1830
|
+
`/admin-api/namespaces/${pathSegment(namespaceId)}/outbound-approvals`
|
|
1831
|
+
)
|
|
1832
|
+
);
|
|
1833
|
+
}
|
|
1834
|
+
/**
|
|
1835
|
+
* Set what `namespaceId` approves for the publisher of `request.applicationId`
|
|
1836
|
+
* to exactly `request.approve`: `'manifest'` or a list of URL prefixes, and
|
|
1837
|
+
* `[]` revokes everything. Takes effect at the app's next run.
|
|
1838
|
+
*/
|
|
1839
|
+
async setOutboundApproval(namespaceId, request) {
|
|
1840
|
+
return unwrap(
|
|
1841
|
+
await this.httpClient.put(
|
|
1842
|
+
`/admin-api/namespaces/${pathSegment(namespaceId)}/outbound-approvals`,
|
|
1843
|
+
// Core declares this body `deny_unknown_fields`, so send exactly these.
|
|
1844
|
+
{ applicationId: request.applicationId, approve: request.approve }
|
|
1845
|
+
)
|
|
1846
|
+
);
|
|
1847
|
+
}
|
|
1826
1848
|
async deleteNamespace(namespaceId) {
|
|
1827
1849
|
return unwrap(
|
|
1828
1850
|
await this.httpClient.request(`/admin-api/namespaces/${pathSegment(namespaceId)}`, {
|
|
@@ -2477,6 +2499,11 @@ var AdminApiClient = class {
|
|
|
2477
2499
|
await this.httpClient.get(`/admin-api/groups/${pathSegment(groupId)}/upgrade/status`)
|
|
2478
2500
|
);
|
|
2479
2501
|
}
|
|
2502
|
+
/** Releases to install before activating the upgrade, in list order (oldest first). An older server returns []. */
|
|
2503
|
+
async getGroupMissingReleases(groupId) {
|
|
2504
|
+
const res = await this.httpClient.get(`/admin-api/groups/${pathSegment(groupId)}/upgrade/status`);
|
|
2505
|
+
return res.missingReleases ?? [];
|
|
2506
|
+
}
|
|
2480
2507
|
/**
|
|
2481
2508
|
* The operator-facing "have all peers migrated?" rollup for a namespace.
|
|
2482
2509
|
* The handler serializes the payload directly, so there is no `{ data }`
|