@calimero-network/mero-js 26.9.1 → 26.10.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 +9 -1
- package/dist/admin-api/admin-client.js +14 -0
- package/dist/admin-api/admin-types.d.ts +45 -0
- package/dist/index.browser.mjs +1 -1
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +22 -0
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2121,6 +2121,28 @@ var AdminApiClient = class {
|
|
|
2121
2121
|
await this.httpClient.post("/admin-api/namespaces", request)
|
|
2122
2122
|
);
|
|
2123
2123
|
}
|
|
2124
|
+
/** What `namespaceId` approves for outbound requests, one entry per publisher. */
|
|
2125
|
+
async listOutboundApprovals(namespaceId) {
|
|
2126
|
+
return unwrap(
|
|
2127
|
+
await this.httpClient.get(
|
|
2128
|
+
`/admin-api/namespaces/${pathSegment(namespaceId)}/outbound-approvals`
|
|
2129
|
+
)
|
|
2130
|
+
);
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Set what `namespaceId` approves for the publisher of `request.applicationId`
|
|
2134
|
+
* to exactly `request.approve`: `'manifest'` or a list of URL prefixes, and
|
|
2135
|
+
* `[]` revokes everything. Takes effect at the app's next run.
|
|
2136
|
+
*/
|
|
2137
|
+
async setOutboundApproval(namespaceId, request) {
|
|
2138
|
+
return unwrap(
|
|
2139
|
+
await this.httpClient.put(
|
|
2140
|
+
`/admin-api/namespaces/${pathSegment(namespaceId)}/outbound-approvals`,
|
|
2141
|
+
// Core declares this body `deny_unknown_fields`, so send exactly these.
|
|
2142
|
+
{ applicationId: request.applicationId, approve: request.approve }
|
|
2143
|
+
)
|
|
2144
|
+
);
|
|
2145
|
+
}
|
|
2124
2146
|
async deleteNamespace(namespaceId) {
|
|
2125
2147
|
return unwrap(
|
|
2126
2148
|
await this.httpClient.request(`/admin-api/namespaces/${pathSegment(namespaceId)}`, {
|