@calimero-network/mero-js 2.4.0 → 2.5.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.mjs CHANGED
@@ -1037,7 +1037,7 @@ var AdminApiClient = class {
1037
1037
  await this.httpClient.put(`/admin-api/groups/${groupId}/metadata`, request);
1038
1038
  }
1039
1039
  async getGroupMetadata(groupId) {
1040
- return unwrap(await this.httpClient.get(`/admin-api/groups/${groupId}/metadata`)).data;
1040
+ return unwrap(await this.httpClient.get(`/admin-api/groups/${groupId}/metadata`))?.data ?? null;
1041
1041
  }
1042
1042
  async setMemberMetadata(groupId, identity, request) {
1043
1043
  await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/metadata`, request);
@@ -1045,7 +1045,7 @@ var AdminApiClient = class {
1045
1045
  async getMemberMetadata(groupId, identity) {
1046
1046
  return unwrap(
1047
1047
  await this.httpClient.get(`/admin-api/groups/${groupId}/members/${identity}/metadata`)
1048
- ).data;
1048
+ )?.data ?? null;
1049
1049
  }
1050
1050
  async setContextMetadata(groupId, contextId, request) {
1051
1051
  await this.httpClient.put(`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`, request);
@@ -1053,7 +1053,7 @@ var AdminApiClient = class {
1053
1053
  async getContextMetadata(groupId, contextId) {
1054
1054
  return unwrap(
1055
1055
  await this.httpClient.get(`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`)
1056
- ).data;
1056
+ )?.data ?? null;
1057
1057
  }
1058
1058
  async syncGroup(groupId, request) {
1059
1059
  return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`, request ?? {}));