@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/README.md +2 -2
- package/dist/cloud-v2/client.d.ts +68 -2
- package/dist/cloud-v2/client.js +32 -2
- package/dist/cloud-v2/index.d.ts +1 -1
- package/dist/index.browser.mjs +5 -5
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +34 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +34 -2
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
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
|
|
@@ -2872,6 +2888,21 @@ var CalimeroClient = class _CalimeroClient {
|
|
|
2872
2888
|
getOrg(org) {
|
|
2873
2889
|
return this.get(`orgs/${seg(org)}`);
|
|
2874
2890
|
}
|
|
2891
|
+
/**
|
|
2892
|
+
* Each member's lockout risk (`GET /orgs/{org}/members?detail=security`),
|
|
2893
|
+
* for the organization's owner and admins: name, role, teams, passkeys held
|
|
2894
|
+
* (to `'3+'`), recovery code set, last active UTC day and live sessions.
|
|
2895
|
+
* A member below admin is refused (`403 FORBIDDEN`), someone outside the
|
|
2896
|
+
* organization gets {@link NotFound}; the admin's own session on the
|
|
2897
|
+
* cluster's origin only, never an API key or a package-bound session. A
|
|
2898
|
+
* node before core #4902 has no such route (a bare `404`).
|
|
2899
|
+
*/
|
|
2900
|
+
async orgMembersSecurity(org) {
|
|
2901
|
+
const { members } = await this.get(
|
|
2902
|
+
`orgs/${seg(org)}/members?detail=security`
|
|
2903
|
+
);
|
|
2904
|
+
return members;
|
|
2905
|
+
}
|
|
2875
2906
|
/**
|
|
2876
2907
|
* Delete an organization with its teams, invites and apps (its owner only).
|
|
2877
2908
|
* The node asks for the owner's passkey (`412 CONFIRM_REQUIRED`), which `passkey` gives.
|
|
@@ -3294,8 +3325,9 @@ var CalimeroClient = class _CalimeroClient {
|
|
|
3294
3325
|
}
|
|
3295
3326
|
/**
|
|
3296
3327
|
* The organizations with instances created from deployment `id`, for its
|
|
3297
|
-
* managers: each one's id, name, instance count, apps and releases,
|
|
3298
|
-
*
|
|
3328
|
+
* managers: each one's id, name, instance count, apps and releases, first
|
|
3329
|
+
* instance, and (core #4902) how many members it has and how many were
|
|
3330
|
+
* active in 30 days. Never who the members are, teams or app data.
|
|
3299
3331
|
*/
|
|
3300
3332
|
deploymentOrgs(id) {
|
|
3301
3333
|
return this.get(`deployments/${seg(id)}/orgs`);
|