@calimero-network/mero-js 8.0.0 → 9.0.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/admin-api/admin-client.d.ts +23 -1
- package/dist/admin-api/admin-client.js +48 -3
- package/dist/admin-api/admin-types.d.ts +38 -4
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +33 -3
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +33 -3
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1104,7 +1104,12 @@ var AdminApiClient = class {
|
|
|
1104
1104
|
return unwrap(await this.httpClient.get(`/admin-api/namespaces/for-application/${applicationId}`));
|
|
1105
1105
|
}
|
|
1106
1106
|
async createNamespace(request) {
|
|
1107
|
-
return unwrap(
|
|
1107
|
+
return unwrap(
|
|
1108
|
+
await this.httpClient.post("/admin-api/namespaces", {
|
|
1109
|
+
upgradePolicy: "LazyOnAccess",
|
|
1110
|
+
...request
|
|
1111
|
+
})
|
|
1112
|
+
);
|
|
1108
1113
|
}
|
|
1109
1114
|
async deleteNamespace(namespaceId, request) {
|
|
1110
1115
|
return unwrap(
|
|
@@ -1185,9 +1190,17 @@ var AdminApiClient = class {
|
|
|
1185
1190
|
async removeGroupMembers(groupId, request) {
|
|
1186
1191
|
await this.httpClient.post(`/admin-api/groups/${groupId}/members/remove`, request);
|
|
1187
1192
|
}
|
|
1193
|
+
/**
|
|
1194
|
+
* `identity` is the member's ACCOUNT (64 hex), as returned by
|
|
1195
|
+
* {@link listGroupMembers} — not the bs58 signing key that added them.
|
|
1196
|
+
*/
|
|
1188
1197
|
async updateMemberRole(groupId, identity, request) {
|
|
1189
1198
|
await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/role`, request);
|
|
1190
1199
|
}
|
|
1200
|
+
/**
|
|
1201
|
+
* `identity` is the member's ACCOUNT (64 hex), as returned by
|
|
1202
|
+
* {@link listGroupMembers} — not the bs58 signing key that added them.
|
|
1203
|
+
*/
|
|
1191
1204
|
async getMemberCapabilities(groupId, identity) {
|
|
1192
1205
|
return unwrap(
|
|
1193
1206
|
await this.httpClient.get(
|
|
@@ -1195,6 +1208,10 @@ var AdminApiClient = class {
|
|
|
1195
1208
|
)
|
|
1196
1209
|
);
|
|
1197
1210
|
}
|
|
1211
|
+
/**
|
|
1212
|
+
* `identity` is the member's ACCOUNT (64 hex), as returned by
|
|
1213
|
+
* {@link listGroupMembers} — not the bs58 signing key that added them.
|
|
1214
|
+
*/
|
|
1198
1215
|
async setMemberCapabilities(groupId, identity, request) {
|
|
1199
1216
|
await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/capabilities`, request);
|
|
1200
1217
|
}
|
|
@@ -1224,6 +1241,10 @@ var AdminApiClient = class {
|
|
|
1224
1241
|
async setMemberMetadata(groupId, identity, request) {
|
|
1225
1242
|
await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/metadata`, request);
|
|
1226
1243
|
}
|
|
1244
|
+
/**
|
|
1245
|
+
* `identity` is the member's ACCOUNT (64 hex), as returned by
|
|
1246
|
+
* {@link listGroupMembers} — not the bs58 signing key that added them.
|
|
1247
|
+
*/
|
|
1227
1248
|
async getMemberMetadata(groupId, identity) {
|
|
1228
1249
|
const response = await this.httpClient.get(
|
|
1229
1250
|
`/admin-api/groups/${groupId}/members/${identity}/metadata`
|
|
@@ -1350,7 +1371,10 @@ var AdminApiClient = class {
|
|
|
1350
1371
|
/** Create a standalone group (POST /admin-api/groups). */
|
|
1351
1372
|
async createGroup(request) {
|
|
1352
1373
|
return unwrap(
|
|
1353
|
-
await this.httpClient.post("/admin-api/groups",
|
|
1374
|
+
await this.httpClient.post("/admin-api/groups", {
|
|
1375
|
+
upgradePolicy: "LazyOnAccess",
|
|
1376
|
+
...request
|
|
1377
|
+
})
|
|
1354
1378
|
);
|
|
1355
1379
|
}
|
|
1356
1380
|
/** Leave a group (POST /admin-api/groups/:group_id/leave). */
|
|
@@ -1376,7 +1400,13 @@ var AdminApiClient = class {
|
|
|
1376
1400
|
request ?? {}
|
|
1377
1401
|
);
|
|
1378
1402
|
}
|
|
1379
|
-
/**
|
|
1403
|
+
/**
|
|
1404
|
+
* Set a member's auto-follow flag (PUT
|
|
1405
|
+
* /admin-api/groups/:group_id/members/:identity/auto-follow).
|
|
1406
|
+
*
|
|
1407
|
+
* `identity` is the member's ACCOUNT (64 hex), as returned by
|
|
1408
|
+
* {@link listGroupMembers} — not the bs58 signing key that added them.
|
|
1409
|
+
*/
|
|
1380
1410
|
async setMemberAutoFollow(groupId, identity, request) {
|
|
1381
1411
|
await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/auto-follow`, request);
|
|
1382
1412
|
}
|