@calimero-network/mero-js 2.5.0 → 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/admin-api/admin-client.d.ts +13 -1
- package/dist/admin-api/admin-client.d.ts.map +1 -1
- package/dist/admin-api/admin-client.js +28 -10
- package/dist/admin-api/admin-client.js.map +1 -1
- package/dist/admin-api/admin-types.d.ts +20 -2
- package/dist/admin-api/admin-types.d.ts.map +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +35 -7
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +35 -7
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -794,6 +794,16 @@ var AdminApiClient = class {
|
|
|
794
794
|
async getApplication(appId) {
|
|
795
795
|
return unwrap(await this.httpClient.get(`/admin-api/applications/${appId}`));
|
|
796
796
|
}
|
|
797
|
+
/**
|
|
798
|
+
* Installed-blob inventory for an application — one entry per locally installed
|
|
799
|
+
* version. This is the *installed* inventory (source for a "pick a version to
|
|
800
|
+
* pin" UI); the registry equivalent is `listPackageVersions`.
|
|
801
|
+
*/
|
|
802
|
+
async listApplicationVersions(applicationId) {
|
|
803
|
+
return unwrap(
|
|
804
|
+
await this.httpClient.get(`/admin-api/applications/${applicationId}/versions`)
|
|
805
|
+
);
|
|
806
|
+
}
|
|
797
807
|
// ---- Package Management ----
|
|
798
808
|
async listPackages() {
|
|
799
809
|
return unwrap(await this.httpClient.get("/admin-api/packages"));
|
|
@@ -861,6 +871,19 @@ var AdminApiClient = class {
|
|
|
861
871
|
async syncContext(contextId) {
|
|
862
872
|
await this.httpClient.post(`/admin-api/contexts/sync/${contextId ?? ""}`, {});
|
|
863
873
|
}
|
|
874
|
+
/**
|
|
875
|
+
* Kick off a full state re-pull for a context (operator recovery for a
|
|
876
|
+
* stranded context). `force` re-pulls even when the node does not flag the
|
|
877
|
+
* context as stranded.
|
|
878
|
+
*/
|
|
879
|
+
async resyncContext(contextId, request = {}) {
|
|
880
|
+
return unwrap(
|
|
881
|
+
await this.httpClient.post(
|
|
882
|
+
`/admin-api/contexts/${contextId}/resync`,
|
|
883
|
+
request
|
|
884
|
+
)
|
|
885
|
+
);
|
|
886
|
+
}
|
|
864
887
|
async inviteSpecializedNode(request) {
|
|
865
888
|
return unwrap(
|
|
866
889
|
await this.httpClient.post(
|
|
@@ -1097,23 +1120,28 @@ var AdminApiClient = class {
|
|
|
1097
1120
|
await this.httpClient.put(`/admin-api/groups/${groupId}/metadata`, request);
|
|
1098
1121
|
}
|
|
1099
1122
|
async getGroupMetadata(groupId) {
|
|
1100
|
-
|
|
1123
|
+
const response = await this.httpClient.get(
|
|
1124
|
+
`/admin-api/groups/${groupId}/metadata`
|
|
1125
|
+
);
|
|
1126
|
+
return response?.data?.data ?? null;
|
|
1101
1127
|
}
|
|
1102
1128
|
async setMemberMetadata(groupId, identity, request) {
|
|
1103
1129
|
await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/metadata`, request);
|
|
1104
1130
|
}
|
|
1105
1131
|
async getMemberMetadata(groupId, identity) {
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
)
|
|
1132
|
+
const response = await this.httpClient.get(
|
|
1133
|
+
`/admin-api/groups/${groupId}/members/${identity}/metadata`
|
|
1134
|
+
);
|
|
1135
|
+
return response?.data?.data ?? null;
|
|
1109
1136
|
}
|
|
1110
1137
|
async setContextMetadata(groupId, contextId, request) {
|
|
1111
1138
|
await this.httpClient.put(`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`, request);
|
|
1112
1139
|
}
|
|
1113
1140
|
async getContextMetadata(groupId, contextId) {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
)
|
|
1141
|
+
const response = await this.httpClient.get(
|
|
1142
|
+
`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`
|
|
1143
|
+
);
|
|
1144
|
+
return response?.data?.data ?? null;
|
|
1117
1145
|
}
|
|
1118
1146
|
async syncGroup(groupId, request) {
|
|
1119
1147
|
return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`, request ?? {}));
|