@calimero-network/mero-js 29.11.0 → 29.13.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
@@ -2805,6 +2805,22 @@ var CalimeroClient = class _CalimeroClient {
2805
2805
  async transferApp(app, to, passkey) {
2806
2806
  await this.postConfirmed(`apps/${seg(app)}/transfer`, { to }, passkey);
2807
2807
  }
2808
+ /**
2809
+ * Move an app instance to another organization (`toOrg`), its data where it
2810
+ * is (core `POST /apps/{app}/move`), approved with `passkey`. Whoever
2811
+ * manages the app now (its owner while a member of its organization, an
2812
+ * admin there, or a personal app's owner) moves it, as an admin or the
2813
+ * owner of `toOrg`. Its files, runs and quotas go to the target; `org` or
2814
+ * app-team access becomes the target's app team of its package.
2815
+ * `bringMembers` adds the people of its organization who reach it to the
2816
+ * target (capped at `member`). A node from before the route answers `404`
2817
+ * ({@link NotFound}): the feature is not there yet.
2818
+ */
2819
+ moveApp(app, toOrg, options = {}, passkey) {
2820
+ const path = `apps/${seg(app)}/move`;
2821
+ const body = { toOrg, bringMembers: options.bringMembers ?? false };
2822
+ return passkey ? this.postConfirmed(path, body, passkey) : this.post(path, body);
2823
+ }
2808
2824
  /**
2809
2825
  * Move an app to another release of its package (`{ version }`), another
2810
2826
  * package, or a bundle hash, running its migration. Answers the upgrade's
@@ -3005,6 +3021,21 @@ var CalimeroClient = class _CalimeroClient {
3005
3021
  getOrg(org) {
3006
3022
  return this.get(`orgs/${seg(org)}`);
3007
3023
  }
3024
+ /**
3025
+ * Each member's lockout risk (`GET /orgs/{org}/members?detail=security`),
3026
+ * for the organization's owner and admins: name, role, teams, passkeys held
3027
+ * (to `'3+'`), recovery code set, last active UTC day and live sessions.
3028
+ * A member below admin is refused (`403 FORBIDDEN`), someone outside the
3029
+ * organization gets {@link NotFound}; the admin's own session on the
3030
+ * cluster's origin only, never an API key or a package-bound session. A
3031
+ * node before core #4902 has no such route (a bare `404`).
3032
+ */
3033
+ async orgMembersSecurity(org) {
3034
+ const { members } = await this.get(
3035
+ `orgs/${seg(org)}/members?detail=security`
3036
+ );
3037
+ return members;
3038
+ }
3008
3039
  /**
3009
3040
  * Delete an organization with its teams, invites and apps (its owner only).
3010
3041
  * The node asks for the owner's passkey (`412 CONFIRM_REQUIRED`), which `passkey` gives.
@@ -3427,8 +3458,9 @@ var CalimeroClient = class _CalimeroClient {
3427
3458
  }
3428
3459
  /**
3429
3460
  * The organizations with instances created from deployment `id`, for its
3430
- * managers: each one's id, name, instance count, apps and releases, and
3431
- * first instance. Never members, teams or app data.
3461
+ * managers: each one's id, name, instance count, apps and releases, first
3462
+ * instance, and (core #4902) how many members it has and how many were
3463
+ * active in 30 days. Never who the members are, teams or app data.
3432
3464
  */
3433
3465
  deploymentOrgs(id) {
3434
3466
  return this.get(`deployments/${seg(id)}/orgs`);