@calimero-network/mero-js 2.5.1 → 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/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(