@canopy-io/node 0.5.0 → 0.6.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/CHANGELOG.md +24 -0
- package/dist/index.cjs +11 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -296
- package/dist/index.d.ts +56 -296
- package/dist/index.js +11 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @canopy-io/node
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 30b76ce: **Breaking:** `identities.deactivate()` and `identities.activate()` are removed, because the API no longer offers them to Environment-scoped keys. An identity's active flag is Account-wide, so a key for one Environment could lock a person out of every other one. To cut an identity off from this key's Environment, use `identities.delete()`, which removes it from this Environment only. Deactivating an identity everywhere is done in the Admin Workspace or through directory sync.
|
|
8
|
+
|
|
9
|
+
`identities.update()` no longer accepts `is_active`, for the same reason.
|
|
10
|
+
|
|
11
|
+
`identities.create()` now documents that `role_id` and `node_id` go together; the API answers 400 when only one is sent, where it used to create the identity with no assignment.
|
|
12
|
+
|
|
13
|
+
Identity invite responses no longer declare `environment_id` and `environment_name`, which the API never returned on an Environment-scoped key. Listing invites accepts `sort_by` (`name`, `email` or `created`) with `order`, which the API now honours.
|
|
14
|
+
|
|
15
|
+
An organization's SSO binding (`organizations.ssoConnections`) now carries `owner_organization_node_id` on its `sso_connection`, naming the organization when its administrator set the connection up from the organization portal. Unbinding such a connection from its organization answers 409 `organization.sso_connection_owned_cannot_unbind`; disable or delete it instead. The connection status enum no longer lists `failed`, which nothing ever set.
|
|
16
|
+
|
|
17
|
+
- 30b76ce: SSO connection responses no longer carry `last_login_failure_at`, `consecutive_failures` or `auto_disabled_at`. Nothing ever set them, so they only ever returned their defaults; a connection is disabled only by a person. `last_login_at` stays and now records each successful sign-in through the connection.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 30b76ce: Types regenerated from the spec, with no shape change: the descriptions now say that a deactivated role grants nothing to its holders (`is_active`, the explain trace's `active`), and that an empty `allowed_children` list makes a node type a leaf.
|
|
22
|
+
|
|
23
|
+
`Authorizer.invalidate()` documents deactivating or reactivating a role as a change to clear the whole cache for, since it changes access for everyone holding the role at once.
|
|
24
|
+
|
|
25
|
+
The identity invite create and resend descriptions say a `password_reset` invite expires after 24 hours; every other invite still expires after 7 days.
|
|
26
|
+
|
|
3
27
|
## 0.5.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -552,29 +552,19 @@ var Identities = class {
|
|
|
552
552
|
{ body: input }
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* Takes the identity out of this key's Environment: its membership here is
|
|
557
|
+
* deactivated and its role assignments here are dropped. The identity and
|
|
558
|
+
* its access to other Environments are untouched. Deactivating an identity
|
|
559
|
+
* everywhere is an Account-level action, not available to an
|
|
560
|
+
* Environment-scoped key.
|
|
561
|
+
*/
|
|
555
562
|
delete(id) {
|
|
556
563
|
return this.client.request(
|
|
557
564
|
"DELETE",
|
|
558
565
|
`/api/v1/identities/${encodeURIComponent(id)}`
|
|
559
566
|
);
|
|
560
567
|
}
|
|
561
|
-
/**
|
|
562
|
-
* Deactivation is the reversible counterpart to `delete` — sessions are
|
|
563
|
-
* revoked and sign-in refused, but the identity and its assignments survive.
|
|
564
|
-
* Prefer it for offboarding you may need to undo.
|
|
565
|
-
*/
|
|
566
|
-
deactivate(id) {
|
|
567
|
-
return this.client.request(
|
|
568
|
-
"POST",
|
|
569
|
-
`/api/v1/identities/${encodeURIComponent(id)}/deactivate`
|
|
570
|
-
);
|
|
571
|
-
}
|
|
572
|
-
activate(id) {
|
|
573
|
-
return this.client.request(
|
|
574
|
-
"POST",
|
|
575
|
-
`/api/v1/identities/${encodeURIComponent(id)}/activate`
|
|
576
|
-
);
|
|
577
|
-
}
|
|
578
568
|
/**
|
|
579
569
|
* Every role this identity holds, and where — across all pages.
|
|
580
570
|
*
|
|
@@ -636,7 +626,7 @@ var Identities = class {
|
|
|
636
626
|
* Ends every session the identity holds, so the next refresh on any device
|
|
637
627
|
* fails and the person signs in again. Access tokens already issued keep
|
|
638
628
|
* working until their short lifetime runs out. For a suspected compromise;
|
|
639
|
-
* `
|
|
629
|
+
* `delete` also takes the identity out of this Environment.
|
|
640
630
|
*/
|
|
641
631
|
revokeSessions(id) {
|
|
642
632
|
return this.client.request(
|
|
@@ -1212,7 +1202,9 @@ var LocalAuthorizer = class {
|
|
|
1212
1202
|
* With no argument, everything goes: grants and the hierarchy tree. Not
|
|
1213
1203
|
* needed in normal operation, where entries expire on their own; useful in
|
|
1214
1204
|
* tests and after a change whose reach you cannot name (a role's
|
|
1215
|
-
* permissions edited, a node moved).
|
|
1205
|
+
* permissions edited, a role deactivated or reactivated, a node moved). A
|
|
1206
|
+
* deactivated role grants nothing to anyone holding it, so until the cache
|
|
1207
|
+
* is cleared or expires, its holders keep being allowed locally.
|
|
1216
1208
|
*
|
|
1217
1209
|
* Multi-instance honesty: an invalidation reaches THIS process only. A
|
|
1218
1210
|
* webhook lands on one instance behind a load balancer; the others serve
|