@canopy-io/node 0.23.1 → 0.23.3

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,17 @@
1
1
  # @canopy-io/node
2
2
 
3
+ ## 0.23.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 9f196bc: Follows Canopy's November 12 release. The generated types add `POST /api/v1/scim-tokens/{id}/rotate`, which replaces a directory token and keeps the old one working for seven days, and carry the fields and error codes earlier releases added. The agent skill teaches that allowed web origins are each Environment's own list: a browser app's site listed only on another Environment is refused with `403 auth.origin_not_allowed` on the Direct API, and a public client's token request with `403 access_denied` (`@canopy-io/browser` raises `CanopyAuthError` with that code). It also says a backend calling Canopy for its browser sends no `Origin` of its own, forwarding one only with the Environment's secret API key, and gives the passkey calls' `{ data }` answers in full. No caller changes are needed.
8
+
9
+ ## 0.23.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 206547c: Follows Canopy's November 8 release. Canopy now sends an error `code` on every error, so an authorizer pointed at a Canopy that does not serve an endpoint it reads (`request.not_found`) reports the misconfiguration again instead of denying; `code` is null only for a response that did not come from Canopy's API. The generated types add `invited_by_identity_id` on organization invites and `previous_role_id`, `previous_node_id` and `organization_id` on `assignment.updated`, and bulk rows' `error.code` is a string. `@canopy-io/browser` exports types for the `<canopy-captcha>` element. No caller changes are needed.
14
+
3
15
  ## 0.23.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2228,7 +2228,7 @@ function authorizationErrorStatus(error) {
2228
2228
  message: "Authorization is misconfigured. Check the Canopy API key and its scopes."
2229
2229
  };
2230
2230
  }
2231
- if (error.statusCode === 404 && error.code === null) {
2231
+ if (error.statusCode === 404 && (error.code === null || error.code === "request.not_found")) {
2232
2232
  return {
2233
2233
  status: 500,
2234
2234
  message: `Authorization is misconfigured: ${error.request.method} ${error.request.path} is not served by this Canopy. The SDK requires an API that exposes the identity grants endpoint.`