@canopy-io/node 0.23.0 → 0.23.2
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 +12 -0
- package/dist/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1627 -1307
- package/dist/index.d.ts +1627 -1307
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @canopy-io/node
|
|
2
2
|
|
|
3
|
+
## 0.23.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
|
|
9
|
+
## 0.23.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 68ef429: `identities.update` takes `{ ifMatch }`, so a save over someone else's newer change answers 409 instead of overwriting it. The generated types add `version` to identities, API keys, publishable keys, SCIM groups and the access model, `binding_version` to an organization's SSO connection, and the `If-Match` header on the routes that compare them. Nothing existing changes shape: a call that sends no version behaves as before.
|
|
14
|
+
|
|
3
15
|
## 0.23.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -582,11 +582,16 @@ var Identities = class {
|
|
|
582
582
|
create(input) {
|
|
583
583
|
return this.client.request("POST", "/api/v1/identities", { body: input });
|
|
584
584
|
}
|
|
585
|
-
|
|
585
|
+
/**
|
|
586
|
+
* Pass `ifMatch` with the identity's current `version` to make a
|
|
587
|
+
* read-modify-write safe: a concurrent edit answers 409 instead of being
|
|
588
|
+
* silently overwritten.
|
|
589
|
+
*/
|
|
590
|
+
update(id, input, options = {}) {
|
|
586
591
|
return this.client.request(
|
|
587
592
|
"PATCH",
|
|
588
593
|
`/api/v1/identities/${encodeURIComponent(id)}`,
|
|
589
|
-
{ body: input }
|
|
594
|
+
{ body: input, ...withConcurrency(options) }
|
|
590
595
|
);
|
|
591
596
|
}
|
|
592
597
|
/**
|
|
@@ -2223,7 +2228,7 @@ function authorizationErrorStatus(error) {
|
|
|
2223
2228
|
message: "Authorization is misconfigured. Check the Canopy API key and its scopes."
|
|
2224
2229
|
};
|
|
2225
2230
|
}
|
|
2226
|
-
if (error.statusCode === 404 && error.code === null) {
|
|
2231
|
+
if (error.statusCode === 404 && (error.code === null || error.code === "request.not_found")) {
|
|
2227
2232
|
return {
|
|
2228
2233
|
status: 500,
|
|
2229
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.`
|