@canopy-io/node 0.3.10 → 0.3.11

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,11 @@
1
1
  # @canopy-io/node
2
2
 
3
+ ## 0.3.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 4b08934: Organization policy types regenerated from the live spec. `updatePolicy` accepts `allowed_sign_in_methods`, a non-empty subset of the methods the Environment offers (`password`, `email_otp`, `sso`) or `null` to inherit them all; a method the Environment has off is refused with `organization.policy_loosens`. `getPolicy` returns the field on the organization's own values, on `environment` (what is offered) and on `effective` (what members may use, `["sso"]` alone while `require_sso` is on).
8
+
3
9
  ## 0.3.10
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -147,7 +147,12 @@ await canopy.organizations.addMember(acme.id, {
147
147
  role_id: ownerRoleId,
148
148
  });
149
149
 
150
- await canopy.organizations.updatePolicy(acme.id, { mfa_required: true });
150
+ // An organization only tightens the Environment: a second factor where the
151
+ // Environment leaves it optional, and only some of the Environment's ways in.
152
+ await canopy.organizations.updatePolicy(acme.id, {
153
+ mfa_required: true,
154
+ allowed_sign_in_methods: ["password", "sso"],
155
+ });
151
156
  ```
152
157
 
153
158
  Directory sync (SCIM) opens when you name the roles an organization's identity
package/dist/index.d.cts CHANGED
@@ -2935,6 +2935,8 @@ interface components {
2935
2935
  mfa_factor_allowlist: ("totp" | "webauthn" | "email_otp")[];
2936
2936
  /** @enum {string} */
2937
2937
  mfa_after_sso: "exempt" | "require";
2938
+ /** @description The sign-in methods on offer: on the Environment, the ones it has turned on; on the effective policy, those narrowed by the organization, and `["sso"]` alone while it requires SSO. */
2939
+ allowed_sign_in_methods: ("password" | "email_otp" | "sso")[];
2938
2940
  require_sso: boolean;
2939
2941
  };
2940
2942
  OrganizationPolicyResponseDto: {
@@ -2944,6 +2946,8 @@ interface components {
2944
2946
  mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[] | null;
2945
2947
  /** @enum {string|null} */
2946
2948
  mfa_after_sso?: "exempt" | "require" | null;
2949
+ /** @description The methods the organization keeps of the Environment's, or null to inherit them all. */
2950
+ allowed_sign_in_methods?: ("password" | "email_otp" | "sso")[] | null;
2947
2951
  require_sso: boolean;
2948
2952
  /** @description The Environment's own settings, the floor this organization's policy tightens from. */
2949
2953
  environment: components["schemas"]["EffectiveOrganizationPolicyDto"];
@@ -2968,6 +2972,8 @@ interface components {
2968
2972
  * @enum {string|null}
2969
2973
  */
2970
2974
  mfa_after_sso?: "exempt" | "require" | null;
2975
+ /** @description The sign-in methods this organization's members may use. A non-empty subset of the methods the Environment offers (`password` unless the Environment turned it off, `email_otp` where the Environment turned it on, and `sso`); a method the Environment does not offer is refused with `organization.policy_loosens`. `null` inherits the Environment's. While `require_sso` is on, SSO is the only method whatever this says. */
2976
+ allowed_sign_in_methods?: ("password" | "email_otp" | "sso")[] | null;
2971
2977
  /** @description Members must sign in through SSO. Password and email-code logins are refused for the organization's members and for any email whose domain routes to a connection bound to this organization. */
2972
2978
  require_sso?: boolean;
2973
2979
  };
@@ -4874,6 +4880,8 @@ interface components {
4874
4880
  * @enum {string|null}
4875
4881
  */
4876
4882
  mfa_after_sso: "exempt" | "require" | null;
4883
+ /** @description The sign-in methods members may use, or null to inherit the Environment's. */
4884
+ allowed_sign_in_methods: ("password" | "email_otp" | "sso")[] | null;
4877
4885
  /** @description Whether members must sign in with SSO. */
4878
4886
  require_sso: boolean;
4879
4887
  };
package/dist/index.d.ts CHANGED
@@ -2935,6 +2935,8 @@ interface components {
2935
2935
  mfa_factor_allowlist: ("totp" | "webauthn" | "email_otp")[];
2936
2936
  /** @enum {string} */
2937
2937
  mfa_after_sso: "exempt" | "require";
2938
+ /** @description The sign-in methods on offer: on the Environment, the ones it has turned on; on the effective policy, those narrowed by the organization, and `["sso"]` alone while it requires SSO. */
2939
+ allowed_sign_in_methods: ("password" | "email_otp" | "sso")[];
2938
2940
  require_sso: boolean;
2939
2941
  };
2940
2942
  OrganizationPolicyResponseDto: {
@@ -2944,6 +2946,8 @@ interface components {
2944
2946
  mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[] | null;
2945
2947
  /** @enum {string|null} */
2946
2948
  mfa_after_sso?: "exempt" | "require" | null;
2949
+ /** @description The methods the organization keeps of the Environment's, or null to inherit them all. */
2950
+ allowed_sign_in_methods?: ("password" | "email_otp" | "sso")[] | null;
2947
2951
  require_sso: boolean;
2948
2952
  /** @description The Environment's own settings, the floor this organization's policy tightens from. */
2949
2953
  environment: components["schemas"]["EffectiveOrganizationPolicyDto"];
@@ -2968,6 +2972,8 @@ interface components {
2968
2972
  * @enum {string|null}
2969
2973
  */
2970
2974
  mfa_after_sso?: "exempt" | "require" | null;
2975
+ /** @description The sign-in methods this organization's members may use. A non-empty subset of the methods the Environment offers (`password` unless the Environment turned it off, `email_otp` where the Environment turned it on, and `sso`); a method the Environment does not offer is refused with `organization.policy_loosens`. `null` inherits the Environment's. While `require_sso` is on, SSO is the only method whatever this says. */
2976
+ allowed_sign_in_methods?: ("password" | "email_otp" | "sso")[] | null;
2971
2977
  /** @description Members must sign in through SSO. Password and email-code logins are refused for the organization's members and for any email whose domain routes to a connection bound to this organization. */
2972
2978
  require_sso?: boolean;
2973
2979
  };
@@ -4874,6 +4880,8 @@ interface components {
4874
4880
  * @enum {string|null}
4875
4881
  */
4876
4882
  mfa_after_sso: "exempt" | "require" | null;
4883
+ /** @description The sign-in methods members may use, or null to inherit the Environment's. */
4884
+ allowed_sign_in_methods: ("password" | "email_otp" | "sso")[] | null;
4877
4885
  /** @description Whether members must sign in with SSO. */
4878
4886
  require_sso: boolean;
4879
4887
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-io/node",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "description": "Official TypeScript SDK for Canopy — hierarchical identity and access management.",
5
5
  "license": "MIT",
6
6
  "author": "Canopy Identity Inc.",