@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.mjs CHANGED
@@ -2672,6 +2672,22 @@ var CalimeroClient = class _CalimeroClient {
2672
2672
  async transferApp(app, to, passkey) {
2673
2673
  await this.postConfirmed(`apps/${seg(app)}/transfer`, { to }, passkey);
2674
2674
  }
2675
+ /**
2676
+ * Move an app instance to another organization (`toOrg`), its data where it
2677
+ * is (core `POST /apps/{app}/move`), approved with `passkey`. Whoever
2678
+ * manages the app now (its owner while a member of its organization, an
2679
+ * admin there, or a personal app's owner) moves it, as an admin or the
2680
+ * owner of `toOrg`. Its files, runs and quotas go to the target; `org` or
2681
+ * app-team access becomes the target's app team of its package.
2682
+ * `bringMembers` adds the people of its organization who reach it to the
2683
+ * target (capped at `member`). A node from before the route answers `404`
2684
+ * ({@link NotFound}): the feature is not there yet.
2685
+ */
2686
+ moveApp(app, toOrg, options = {}, passkey) {
2687
+ const path = `apps/${seg(app)}/move`;
2688
+ const body = { toOrg, bringMembers: options.bringMembers ?? false };
2689
+ return passkey ? this.postConfirmed(path, body, passkey) : this.post(path, body);
2690
+ }
2675
2691
  /**
2676
2692
  * Move an app to another release of its package (`{ version }`), another
2677
2693
  * package, or a bundle hash, running its migration. Answers the upgrade's
@@ -3125,6 +3141,20 @@ var CalimeroClient = class _CalimeroClient {
3125
3141
  async setCapabilities(org, capabilities, passkey, at = {}) {
3126
3142
  await this.postConfirmed(`orgs/${seg(org)}/capabilities`, { capabilities, ...at }, passkey);
3127
3143
  }
3144
+ /**
3145
+ * Give a member every app added to the organization from now on, or stop
3146
+ * it (`allApps: false`), core `POST /orgs/{org}/all-apps`: the owner's or
3147
+ * an admin's, approved with `passkey` (`__set_all_apps { account, allApps
3148
+ * }`). Each app team made after gives them a row, so in an organization
3149
+ * that keeps its apps apart a new app reaches them though nobody named
3150
+ * them; apps already there are untouched. {@link invite} with
3151
+ * `{ allApps: true }` gives it to whoever redeems the invite. A member
3152
+ * below admin is refused (`403`), someone outside gets {@link NotFound};
3153
+ * a node from before the route answers a bare `404`.
3154
+ */
3155
+ async setAllApps(org, account, allApps, passkey) {
3156
+ await this.postConfirmed(`orgs/${seg(org)}/all-apps`, { account, allApps }, passkey);
3157
+ }
3128
3158
  /**
3129
3159
  * Set the capability bits everyone in `team` holds there on top of their
3130
3160
  * own, unless their row sets its own (`POST /orgs/{org}/capabilities` with