@calimero-network/mero-js 2.4.1 → 2.5.1

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,23 +1037,28 @@ 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 ?? null;
1040
+ const response = await this.httpClient.get(
1041
+ `/admin-api/groups/${groupId}/metadata`
1042
+ );
1043
+ return response?.data?.data ?? null;
1041
1044
  }
1042
1045
  async setMemberMetadata(groupId, identity, request) {
1043
1046
  await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/metadata`, request);
1044
1047
  }
1045
1048
  async getMemberMetadata(groupId, identity) {
1046
- return unwrap(
1047
- await this.httpClient.get(`/admin-api/groups/${groupId}/members/${identity}/metadata`)
1048
- )?.data ?? null;
1049
+ const response = await this.httpClient.get(
1050
+ `/admin-api/groups/${groupId}/members/${identity}/metadata`
1051
+ );
1052
+ return response?.data?.data ?? null;
1049
1053
  }
1050
1054
  async setContextMetadata(groupId, contextId, request) {
1051
1055
  await this.httpClient.put(`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`, request);
1052
1056
  }
1053
1057
  async getContextMetadata(groupId, contextId) {
1054
- return unwrap(
1055
- await this.httpClient.get(`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`)
1056
- )?.data ?? null;
1058
+ const response = await this.httpClient.get(
1059
+ `/admin-api/groups/${groupId}/contexts/${contextId}/metadata`
1060
+ );
1061
+ return response?.data?.data ?? null;
1057
1062
  }
1058
1063
  async syncGroup(groupId, request) {
1059
1064
  return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`, request ?? {}));