@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.cjs CHANGED
@@ -1097,7 +1097,7 @@ var AdminApiClient = class {
1097
1097
  await this.httpClient.put(`/admin-api/groups/${groupId}/metadata`, request);
1098
1098
  }
1099
1099
  async getGroupMetadata(groupId) {
1100
- return unwrap(await this.httpClient.get(`/admin-api/groups/${groupId}/metadata`)).data;
1100
+ return unwrap(await this.httpClient.get(`/admin-api/groups/${groupId}/metadata`))?.data ?? null;
1101
1101
  }
1102
1102
  async setMemberMetadata(groupId, identity, request) {
1103
1103
  await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/metadata`, request);
@@ -1105,7 +1105,7 @@ var AdminApiClient = class {
1105
1105
  async getMemberMetadata(groupId, identity) {
1106
1106
  return unwrap(
1107
1107
  await this.httpClient.get(`/admin-api/groups/${groupId}/members/${identity}/metadata`)
1108
- ).data;
1108
+ )?.data ?? null;
1109
1109
  }
1110
1110
  async setContextMetadata(groupId, contextId, request) {
1111
1111
  await this.httpClient.put(`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`, request);
@@ -1113,7 +1113,7 @@ var AdminApiClient = class {
1113
1113
  async getContextMetadata(groupId, contextId) {
1114
1114
  return unwrap(
1115
1115
  await this.httpClient.get(`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`)
1116
- ).data;
1116
+ )?.data ?? null;
1117
1117
  }
1118
1118
  async syncGroup(groupId, request) {
1119
1119
  return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`, request ?? {}));