@calimero-network/mero-js 29.12.0 → 29.14.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
@@ -3258,6 +3274,20 @@ var CalimeroClient = class _CalimeroClient {
3258
3274
  async setCapabilities(org, capabilities, passkey, at = {}) {
3259
3275
  await this.postConfirmed(`orgs/${seg(org)}/capabilities`, { capabilities, ...at }, passkey);
3260
3276
  }
3277
+ /**
3278
+ * Give a member every app added to the organization from now on, or stop
3279
+ * it (`allApps: false`), core `POST /orgs/{org}/all-apps`: the owner's or
3280
+ * an admin's, approved with `passkey` (`__set_all_apps { account, allApps
3281
+ * }`). Each app team made after gives them a row, so in an organization
3282
+ * that keeps its apps apart a new app reaches them though nobody named
3283
+ * them; apps already there are untouched. {@link invite} with
3284
+ * `{ allApps: true }` gives it to whoever redeems the invite. A member
3285
+ * below admin is refused (`403`), someone outside gets {@link NotFound};
3286
+ * a node from before the route answers a bare `404`.
3287
+ */
3288
+ async setAllApps(org, account, allApps, passkey) {
3289
+ await this.postConfirmed(`orgs/${seg(org)}/all-apps`, { account, allApps }, passkey);
3290
+ }
3261
3291
  /**
3262
3292
  * Set the capability bits everyone in `team` holds there on top of their
3263
3293
  * own, unless their row sets its own (`POST /orgs/{org}/capabilities` with