@canopy-io/node 0.3.7 → 0.3.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @canopy-io/node
2
2
 
3
+ ## 0.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - dc7525d: `organizations.setDirectoryGrantableRoles` with an empty list now returns the organization to the Environment's list when one is set, under a connected directory too. It is refused only when there is no Environment list to fall back on. Types regenerated from the live spec; no signatures change.
8
+
9
+ ## 0.3.8
10
+
11
+ ### Patch Changes
12
+
13
+ - a96ec16: `organizations.resetMemberMfa(id, identityId)` clears a member's second factor (factors, recovery codes and remembered devices) so they enrol again at their next sign-in.
14
+
15
+ Types regenerated from the live spec: the organization's SSO connection can be created without `default_role_id` and reports it as nullable, `GET /api/v1/organizations/:id/sso-connection/arrival-roles` lists the roles its sign-ins may arrive with (`is_default`, `administers_organization`), and the directory detail carries `grantable_roles_source` (`organization`, `environment` or `none`). The arrival-roles route is reachable through `canopy.client.request`, like the rest of that connection's routes.
16
+
3
17
  ## 0.3.7
4
18
 
5
19
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -698,6 +698,18 @@ var Organizations = class {
698
698
  `/api/v1/organizations/${enc(id)}/members/${enc(identityId)}`
699
699
  );
700
700
  }
701
+ /**
702
+ * Clears a member's second factor, for one who lost their authenticator:
703
+ * their factors, recovery codes and remembered devices go, and they enrol
704
+ * again at their next sign-in. Sessions already open are left alone. The
705
+ * identity must be a member of the organization.
706
+ */
707
+ resetMemberMfa(id, identityId) {
708
+ return this.client.request(
709
+ "POST",
710
+ `/api/v1/organizations/${enc(id)}/members/${enc(identityId)}/mfa/reset`
711
+ );
712
+ }
701
713
  // ── Invitations: pending membership, carrying the role the recipient will hold ──
702
714
  listInvites(id, query = {}) {
703
715
  return paginate(
@@ -786,9 +798,11 @@ var Organizations = class {
786
798
  * Replace the list in one act, which is how directory sync is opened for
787
799
  * an organization. Exactly one role is `default_role_id`, the one people
788
800
  * arrive with. Withdrawing a role unmaps the groups naming it and keeps
789
- * their members in the organization; an empty list is refused while a
790
- * directory is connected. Your API key only: an organization admin's
791
- * token can read the list but is refused changing it.
801
+ * their members in the organization. An empty list removes the
802
+ * organization's own list: it then holds the Environment's list when one
803
+ * is set, and otherwise directory sync closes for it, which is refused
804
+ * while a directory is connected. Your API key only: an organization
805
+ * admin's token can read the list but is refused changing it.
792
806
  */
793
807
  setDirectoryGrantableRoles(id, input) {
794
808
  return this.client.request(