@calimero-network/mero-js 6.0.4 → 6.1.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/README.md +37 -1
- package/dist/admin-api/admin-client.d.ts +8 -1
- package/dist/admin-api/admin-client.d.ts.map +1 -1
- package/dist/admin-api/admin-client.js +24 -0
- package/dist/admin-api/admin-client.js.map +1 -1
- package/dist/admin-api/admin-types.d.ts +13 -0
- package/dist/admin-api/admin-types.d.ts.map +1 -1
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +19 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +19 -0
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -901,6 +901,21 @@ var AdminApiClient = class {
|
|
|
901
901
|
parse: "arrayBuffer"
|
|
902
902
|
});
|
|
903
903
|
}
|
|
904
|
+
/**
|
|
905
|
+
* Fetch a blob's metadata without downloading it. `HEAD /admin-api/blobs/:id`
|
|
906
|
+
* returns the info in response headers (size via `content-length`, plus
|
|
907
|
+
* `x-blob-id`/`x-blob-hash`/`x-blob-mime-type`).
|
|
908
|
+
*/
|
|
909
|
+
async getBlobInfo(blobId) {
|
|
910
|
+
const { headers } = await this.httpClient.head(`/admin-api/blobs/${blobId}`);
|
|
911
|
+
const size = Number(headers["content-length"]);
|
|
912
|
+
return {
|
|
913
|
+
blobId: headers["x-blob-id"] ?? blobId,
|
|
914
|
+
size: Number.isFinite(size) ? size : 0,
|
|
915
|
+
hash: headers["x-blob-hash"],
|
|
916
|
+
mimeType: headers["x-blob-mime-type"]
|
|
917
|
+
};
|
|
918
|
+
}
|
|
904
919
|
// ---- Alias Management ----
|
|
905
920
|
async createContextAlias(request) {
|
|
906
921
|
return unwrap(
|
|
@@ -1108,6 +1123,10 @@ var AdminApiClient = class {
|
|
|
1108
1123
|
async setTeeAdmissionPolicy(groupId, request) {
|
|
1109
1124
|
await this.httpClient.put(`/admin-api/groups/${groupId}/settings/tee-admission-policy`, request);
|
|
1110
1125
|
}
|
|
1126
|
+
async getTeeAdmissionPolicy(groupId) {
|
|
1127
|
+
const response = await this.httpClient.get(`/admin-api/groups/${groupId}/settings/tee-admission-policy`);
|
|
1128
|
+
return response.data ?? response;
|
|
1129
|
+
}
|
|
1111
1130
|
async updateGroupSettings(groupId, request) {
|
|
1112
1131
|
await this.httpClient.patch(`/admin-api/groups/${groupId}`, request);
|
|
1113
1132
|
}
|