@calimero-network/mero-js 29.10.0 → 29.12.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
@@ -2525,6 +2525,19 @@ var CalimeroClient = class _CalimeroClient {
2525
2525
  async revokeSession(session) {
2526
2526
  await this.delete(`auth/sessions/${seg(session)}`);
2527
2527
  }
2528
+ /**
2529
+ * What the signed-in account's passkeys did, newest first (the last 100,
2530
+ * `GET /auth/activity`): each sign-in, with the package and origin its
2531
+ * session is bound to, and each change a passkey approved, with its method
2532
+ * and subject. `after` (Unix seconds) keeps only what came later. Gated as
2533
+ * {@link listSessions}: the account holder's own session on the cluster's
2534
+ * origin only. A node before core #4901 has no such route ({@link NotFound}).
2535
+ */
2536
+ async listActivity(after) {
2537
+ const query = after === void 0 ? "" : `?after=${encodeURIComponent(String(after))}`;
2538
+ const { activity } = await this.get(`auth/activity${query}`);
2539
+ return activity;
2540
+ }
2528
2541
  async signingOut(path) {
2529
2542
  try {
2530
2543
  await this.post(path);
@@ -2992,6 +3005,21 @@ var CalimeroClient = class _CalimeroClient {
2992
3005
  getOrg(org) {
2993
3006
  return this.get(`orgs/${seg(org)}`);
2994
3007
  }
3008
+ /**
3009
+ * Each member's lockout risk (`GET /orgs/{org}/members?detail=security`),
3010
+ * for the organization's owner and admins: name, role, teams, passkeys held
3011
+ * (to `'3+'`), recovery code set, last active UTC day and live sessions.
3012
+ * A member below admin is refused (`403 FORBIDDEN`), someone outside the
3013
+ * organization gets {@link NotFound}; the admin's own session on the
3014
+ * cluster's origin only, never an API key or a package-bound session. A
3015
+ * node before core #4902 has no such route (a bare `404`).
3016
+ */
3017
+ async orgMembersSecurity(org) {
3018
+ const { members } = await this.get(
3019
+ `orgs/${seg(org)}/members?detail=security`
3020
+ );
3021
+ return members;
3022
+ }
2995
3023
  /**
2996
3024
  * Delete an organization with its teams, invites and apps (its owner only).
2997
3025
  * The node asks for the owner's passkey (`412 CONFIRM_REQUIRED`), which `passkey` gives.
@@ -3414,8 +3442,9 @@ var CalimeroClient = class _CalimeroClient {
3414
3442
  }
3415
3443
  /**
3416
3444
  * The organizations with instances created from deployment `id`, for its
3417
- * managers: each one's id, name, instance count, apps and releases, and
3418
- * first instance. Never members, teams or app data.
3445
+ * managers: each one's id, name, instance count, apps and releases, first
3446
+ * instance, and (core #4902) how many members it has and how many were
3447
+ * active in 30 days. Never who the members are, teams or app data.
3419
3448
  */
3420
3449
  deploymentOrgs(id) {
3421
3450
  return this.get(`deployments/${seg(id)}/orgs`);