@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.mjs CHANGED
@@ -2392,6 +2392,19 @@ var CalimeroClient = class _CalimeroClient {
2392
2392
  async revokeSession(session) {
2393
2393
  await this.delete(`auth/sessions/${seg(session)}`);
2394
2394
  }
2395
+ /**
2396
+ * What the signed-in account's passkeys did, newest first (the last 100,
2397
+ * `GET /auth/activity`): each sign-in, with the package and origin its
2398
+ * session is bound to, and each change a passkey approved, with its method
2399
+ * and subject. `after` (Unix seconds) keeps only what came later. Gated as
2400
+ * {@link listSessions}: the account holder's own session on the cluster's
2401
+ * origin only. A node before core #4901 has no such route ({@link NotFound}).
2402
+ */
2403
+ async listActivity(after) {
2404
+ const query = after === void 0 ? "" : `?after=${encodeURIComponent(String(after))}`;
2405
+ const { activity } = await this.get(`auth/activity${query}`);
2406
+ return activity;
2407
+ }
2395
2408
  async signingOut(path) {
2396
2409
  try {
2397
2410
  await this.post(path);
@@ -2859,6 +2872,21 @@ var CalimeroClient = class _CalimeroClient {
2859
2872
  getOrg(org) {
2860
2873
  return this.get(`orgs/${seg(org)}`);
2861
2874
  }
2875
+ /**
2876
+ * Each member's lockout risk (`GET /orgs/{org}/members?detail=security`),
2877
+ * for the organization's owner and admins: name, role, teams, passkeys held
2878
+ * (to `'3+'`), recovery code set, last active UTC day and live sessions.
2879
+ * A member below admin is refused (`403 FORBIDDEN`), someone outside the
2880
+ * organization gets {@link NotFound}; the admin's own session on the
2881
+ * cluster's origin only, never an API key or a package-bound session. A
2882
+ * node before core #4902 has no such route (a bare `404`).
2883
+ */
2884
+ async orgMembersSecurity(org) {
2885
+ const { members } = await this.get(
2886
+ `orgs/${seg(org)}/members?detail=security`
2887
+ );
2888
+ return members;
2889
+ }
2862
2890
  /**
2863
2891
  * Delete an organization with its teams, invites and apps (its owner only).
2864
2892
  * The node asks for the owner's passkey (`412 CONFIRM_REQUIRED`), which `passkey` gives.
@@ -3281,8 +3309,9 @@ var CalimeroClient = class _CalimeroClient {
3281
3309
  }
3282
3310
  /**
3283
3311
  * The organizations with instances created from deployment `id`, for its
3284
- * managers: each one's id, name, instance count, apps and releases, and
3285
- * first instance. Never members, teams or app data.
3312
+ * managers: each one's id, name, instance count, apps and releases, first
3313
+ * instance, and (core #4902) how many members it has and how many were
3314
+ * active in 30 days. Never who the members are, teams or app data.
3286
3315
  */
3287
3316
  deploymentOrgs(id) {
3288
3317
  return this.get(`deployments/${seg(id)}/orgs`);