@calimero-network/mero-js 18.1.0 → 18.2.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
@@ -928,16 +928,7 @@ var AdminApiClient = class {
928
928
  const body = { ...request, initializationParams: request.initializationParams ?? [] };
929
929
  return unwrap(await this.httpClient.post("/admin-api/contexts", body));
930
930
  }
931
- async deleteContext(contextId, request) {
932
- if (request) {
933
- return unwrap(
934
- await this.httpClient.request(`/admin-api/contexts/${contextId}`, {
935
- method: "DELETE",
936
- body: JSON.stringify(request),
937
- headers: { "Content-Type": "application/json" }
938
- })
939
- );
940
- }
931
+ async deleteContext(contextId) {
941
932
  return unwrap(await this.httpClient.delete(`/admin-api/contexts/${contextId}`));
942
933
  }
943
934
  async getContexts() {
@@ -1193,17 +1184,14 @@ var AdminApiClient = class {
1193
1184
  }
1194
1185
  async createNamespace(request) {
1195
1186
  return unwrap(
1196
- await this.httpClient.post("/admin-api/namespaces", {
1197
- upgradePolicy: "LazyOnAccess",
1198
- ...request
1199
- })
1187
+ await this.httpClient.post("/admin-api/namespaces", request)
1200
1188
  );
1201
1189
  }
1202
- async deleteNamespace(namespaceId, request) {
1190
+ async deleteNamespace(namespaceId) {
1203
1191
  return unwrap(
1204
1192
  await this.httpClient.request(`/admin-api/namespaces/${namespaceId}`, {
1205
1193
  method: "DELETE",
1206
- body: JSON.stringify(request ?? {}),
1194
+ body: "{}",
1207
1195
  headers: { "Content-Type": "application/json" }
1208
1196
  })
1209
1197
  );
@@ -1400,11 +1388,11 @@ var AdminApiClient = class {
1400
1388
  async getSubgroupVisibility(groupId) {
1401
1389
  return (await this.getGroupInfo(groupId)).subgroupVisibility;
1402
1390
  }
1403
- async deleteGroup(groupId, request) {
1391
+ async deleteGroup(groupId) {
1404
1392
  return unwrap(
1405
1393
  await this.httpClient.request(`/admin-api/groups/${groupId}`, {
1406
1394
  method: "DELETE",
1407
- body: JSON.stringify(request ?? {}),
1395
+ body: "{}",
1408
1396
  headers: { "Content-Type": "application/json" }
1409
1397
  })
1410
1398
  );
@@ -1504,8 +1492,8 @@ var AdminApiClient = class {
1504
1492
  );
1505
1493
  return response?.data ?? null;
1506
1494
  }
1507
- async syncGroup(groupId, request) {
1508
- return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`, request ?? {}));
1495
+ async syncGroup(groupId) {
1496
+ return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`, {}));
1509
1497
  }
1510
1498
  async upgradeGroup(groupId, request) {
1511
1499
  return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/upgrade`, request));
@@ -1531,11 +1519,11 @@ var AdminApiClient = class {
1531
1519
  await this.httpClient.get(`/admin-api/groups/${id}/cascade-status`)
1532
1520
  );
1533
1521
  }
1534
- async retryGroupUpgrade(groupId, request) {
1522
+ async retryGroupUpgrade(groupId) {
1535
1523
  return unwrap(
1536
1524
  await this.httpClient.post(
1537
1525
  `/admin-api/groups/${groupId}/upgrade/retry`,
1538
- request ?? {}
1526
+ {}
1539
1527
  )
1540
1528
  );
1541
1529
  }
@@ -1550,8 +1538,8 @@ var AdminApiClient = class {
1550
1538
  );
1551
1539
  return response.subgroups ?? response.data ?? [];
1552
1540
  }
1553
- async detachContextFromGroup(groupId, contextId, request) {
1554
- await this.httpClient.post(`/admin-api/groups/${groupId}/contexts/${contextId}/remove`, request ?? {});
1541
+ async detachContextFromGroup(groupId, contextId) {
1542
+ await this.httpClient.post(`/admin-api/groups/${groupId}/contexts/${contextId}/remove`, {});
1555
1543
  }
1556
1544
  // ---- Group Invitation & Join ----
1557
1545
  async createGroupInvitation(groupId, request) {
@@ -1607,33 +1595,33 @@ var AdminApiClient = class {
1607
1595
  /** Create a standalone group (POST /admin-api/groups). */
1608
1596
  async createGroup(request) {
1609
1597
  return unwrap(
1610
- await this.httpClient.post("/admin-api/groups", {
1611
- upgradePolicy: "LazyOnAccess",
1612
- ...request
1613
- })
1598
+ await this.httpClient.post("/admin-api/groups", request)
1614
1599
  );
1615
1600
  }
1616
1601
  /** Leave a group (POST /admin-api/groups/:group_id/leave). */
1617
- async leaveGroup(groupId, request) {
1618
- await this.httpClient.post(`/admin-api/groups/${groupId}/leave`, request ?? {});
1602
+ async leaveGroup(groupId) {
1603
+ await this.httpClient.post(`/admin-api/groups/${groupId}/leave`, {});
1619
1604
  }
1620
1605
  /** Leave a context (POST /admin-api/contexts/:context_id/leave). */
1621
- async leaveContext(contextId, request) {
1622
- await this.httpClient.post(`/admin-api/contexts/${contextId}/leave`, request ?? {});
1606
+ async leaveContext(contextId) {
1607
+ await this.httpClient.post(`/admin-api/contexts/${contextId}/leave`, {});
1623
1608
  }
1624
1609
  /** Leave a namespace (POST /admin-api/namespaces/:namespace_id/leave). */
1625
- async leaveNamespace(namespaceId, request) {
1626
- await this.httpClient.post(`/admin-api/namespaces/${namespaceId}/leave`, request ?? {});
1610
+ async leaveNamespace(namespaceId) {
1611
+ await this.httpClient.post(`/admin-api/namespaces/${namespaceId}/leave`, {});
1627
1612
  }
1628
1613
  /** Issue a group ownership proof (POST /admin-api/groups/:group_id/issue-ownership-proof). */
1629
1614
  async issueOwnershipProof(groupId, request) {
1630
- return this.httpClient.post(`/admin-api/groups/${groupId}/issue-ownership-proof`, request ?? {});
1615
+ return this.httpClient.post(
1616
+ `/admin-api/groups/${groupId}/issue-ownership-proof`,
1617
+ request
1618
+ );
1631
1619
  }
1632
1620
  /** Issue a namespace ownership proof (POST /admin-api/groups/:group_id/issue-namespace-ownership-proof). */
1633
1621
  async issueNamespaceOwnershipProof(groupId, request) {
1634
1622
  return this.httpClient.post(
1635
1623
  `/admin-api/groups/${groupId}/issue-namespace-ownership-proof`,
1636
- request ?? {}
1624
+ request
1637
1625
  );
1638
1626
  }
1639
1627
  /**
@@ -1648,11 +1636,8 @@ var AdminApiClient = class {
1648
1636
  await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/auto-follow`, request);
1649
1637
  }
1650
1638
  /** Abort a namespace migration (POST /admin-api/groups/:namespace_id/migration/abort). */
1651
- async abortMigration(namespaceId, request) {
1652
- return this.httpClient.post(
1653
- `/admin-api/groups/${namespaceId}/migration/abort`,
1654
- request ?? {}
1655
- );
1639
+ async abortMigration(namespaceId) {
1640
+ return this.httpClient.post(`/admin-api/groups/${namespaceId}/migration/abort`, {});
1656
1641
  }
1657
1642
  };
1658
1643