@canopy-io/node 0.11.0 → 0.12.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/dist/index.d.ts CHANGED
@@ -1095,6 +1095,170 @@ interface paths {
1095
1095
  patch?: never;
1096
1096
  trace?: never;
1097
1097
  };
1098
+ "/api/v1/organizations/{id}/me": {
1099
+ parameters: {
1100
+ query?: never;
1101
+ header?: never;
1102
+ path?: never;
1103
+ cookie?: never;
1104
+ };
1105
+ /**
1106
+ * What the caller administers in an organization
1107
+ * @description The authority read a customer's admin screen renders from: whether the caller holds `canopy:organization.manage` at the organization node (`administers_organization`), the topmost nodes where they hold `canopy:access.manage` inside it (`access_roots`, each with its name, type and the path of names from the organization down to it; the organization node itself when they administer the organization), the same for the structure and roles keys (empty until those ship), and whether the Environment's schema allows nodes beneath an organization (`has_hierarchy`). Computed from assignments at or beneath the organization node only, so a role held above every organization does not count. The developer's key answers as administering the whole organization. Refused with `403` for a caller holding nothing inside the organization.
1108
+ */
1109
+ get: operations["ApiOrganizationAccessController_me"];
1110
+ put?: never;
1111
+ post?: never;
1112
+ delete?: never;
1113
+ options?: never;
1114
+ head?: never;
1115
+ patch?: never;
1116
+ trace?: never;
1117
+ };
1118
+ "/api/v1/organizations/{id}/tree": {
1119
+ parameters: {
1120
+ query?: never;
1121
+ header?: never;
1122
+ path?: never;
1123
+ cookie?: never;
1124
+ };
1125
+ /**
1126
+ * List the organization's tree as the caller sees it
1127
+ * @description The organization's subtree pruned to the caller: every node beneath a node they administer is `accessible`, the ancestors between the organization node and such a node are `context_only`, and nothing else is returned. A paged flat list, each row carrying its parent, in the shape of the developer's node listing. Admitted to whoever the authority read admits.
1128
+ */
1129
+ get: operations["ApiOrganizationAccessController_tree"];
1130
+ put?: never;
1131
+ post?: never;
1132
+ delete?: never;
1133
+ options?: never;
1134
+ head?: never;
1135
+ patch?: never;
1136
+ trace?: never;
1137
+ };
1138
+ "/api/v1/organizations/{id}/nodes/{nodeId}/access": {
1139
+ parameters: {
1140
+ query?: never;
1141
+ header?: never;
1142
+ path?: never;
1143
+ cookie?: never;
1144
+ };
1145
+ /**
1146
+ * List who holds a role at a node in the organization
1147
+ * @description Who holds a role at the node, directly or inherited from a node above it inside the organization: one row per assignment with the identity, the role, where it was granted and its window. Paginated; filtered and sorted as the developer's node identities listing is. Requires `hierarchy.view` at the node, or `canopy:organization.manage` at the organization, or `canopy:access.manage` at the node or above it.
1148
+ */
1149
+ get: operations["ApiOrganizationAccessController_listAccess"];
1150
+ put?: never;
1151
+ post?: never;
1152
+ delete?: never;
1153
+ options?: never;
1154
+ head?: never;
1155
+ patch?: never;
1156
+ trace?: never;
1157
+ };
1158
+ "/api/v1/organizations/{id}/nodes/{nodeId}/access/summary": {
1159
+ parameters: {
1160
+ query?: never;
1161
+ header?: never;
1162
+ path?: never;
1163
+ cookie?: never;
1164
+ };
1165
+ /**
1166
+ * Summarize who holds a role at a node in the organization
1167
+ * @description The counts over the node's assignments: direct and inherited people, by status, roles in use and the most recent arrivals, with `can_manage_assignments` saying whether the caller may change them. Requires the same as the node access listing.
1168
+ */
1169
+ get: operations["ApiOrganizationAccessController_accessSummary"];
1170
+ put?: never;
1171
+ post?: never;
1172
+ delete?: never;
1173
+ options?: never;
1174
+ head?: never;
1175
+ patch?: never;
1176
+ trace?: never;
1177
+ };
1178
+ "/api/v1/organizations/{id}/nodes/{nodeId}/grantable-roles": {
1179
+ parameters: {
1180
+ query?: never;
1181
+ header?: never;
1182
+ path?: never;
1183
+ cookie?: never;
1184
+ };
1185
+ /**
1186
+ * List the roles the caller may grant at a node
1187
+ * @description The active, assignable roles of the Environment kept to the ones the caller may grant at the node under the grant ceiling: for an identity, those whose every permission it holds at the node or above; every assignable role for the developer's key and Console users. The list a picker offers, so nothing it shows is refused on write. Requires `canopy:access.manage` at the node or above it, `canopy:organization.manage` at the organization, or `hierarchy.manage` at the node. The response is an unpaginated `{ items }` array.
1188
+ */
1189
+ get: operations["ApiOrganizationAccessController_grantableRoles"];
1190
+ put?: never;
1191
+ post?: never;
1192
+ delete?: never;
1193
+ options?: never;
1194
+ head?: never;
1195
+ patch?: never;
1196
+ trace?: never;
1197
+ };
1198
+ "/api/v1/organizations/{id}/nodes/{nodeId}/members": {
1199
+ parameters: {
1200
+ query?: never;
1201
+ header?: never;
1202
+ path?: never;
1203
+ cookie?: never;
1204
+ };
1205
+ /**
1206
+ * List the organization's members, for granting a role at a node
1207
+ * @description The organization's members as candidates for a role at the node: each row names the identity only. Paginated; `q` searches name and email. Requires the same as the grantable-roles read at the node, so an administrator of one office may choose from the whole organization's roster without reading what anyone else holds.
1208
+ */
1209
+ get: operations["ApiOrganizationAccessController_listMembersAt"];
1210
+ put?: never;
1211
+ post?: never;
1212
+ delete?: never;
1213
+ options?: never;
1214
+ head?: never;
1215
+ patch?: never;
1216
+ trace?: never;
1217
+ };
1218
+ "/api/v1/organizations/{id}/assignments": {
1219
+ parameters: {
1220
+ query?: never;
1221
+ header?: never;
1222
+ path?: never;
1223
+ cookie?: never;
1224
+ };
1225
+ get?: never;
1226
+ put?: never;
1227
+ /**
1228
+ * Grant a role at a node beneath the organization
1229
+ * @description Grants `role_id` to `identity_id` at `node_id`, the organization node or one beneath it. The identity must be a member of the organization (`409 organization.membership_required` otherwise). Requires `rbac.manage_assignments` at the node, `canopy:organization.manage` at the organization, or `canopy:access.manage` at the node or above it, within the grant ceiling. Emits `assignment.created`.
1230
+ */
1231
+ post: operations["ApiOrganizationAccessController_createAssignment"];
1232
+ delete?: never;
1233
+ options?: never;
1234
+ head?: never;
1235
+ patch?: never;
1236
+ trace?: never;
1237
+ };
1238
+ "/api/v1/organizations/{id}/assignments/{assignmentId}": {
1239
+ parameters: {
1240
+ query?: never;
1241
+ header?: never;
1242
+ path?: never;
1243
+ cookie?: never;
1244
+ };
1245
+ get?: never;
1246
+ put?: never;
1247
+ post?: never;
1248
+ /**
1249
+ * Take a grant in the organization away
1250
+ * @description Removes an assignment at the organization node or beneath it; the membership stays. Never bounded by the grant ceiling, but the last administrator's role at the organization node cannot be removed (`409 organization.last_admin`). Requires the same as creating one.
1251
+ */
1252
+ delete: operations["ApiOrganizationAccessController_removeAssignment"];
1253
+ options?: never;
1254
+ head?: never;
1255
+ /**
1256
+ * Change a grant in the organization
1257
+ * @description Changes the role or the window of an assignment at the organization node or beneath it. A new role meets the grant ceiling; dates alone do not. The last administrator's role at the organization node cannot be changed away (`409 organization.last_admin`). Requires the same as creating one.
1258
+ */
1259
+ patch: operations["ApiOrganizationAccessController_updateAssignment"];
1260
+ trace?: never;
1261
+ };
1098
1262
  "/api/v1/organizations": {
1099
1263
  parameters: {
1100
1264
  query?: never;
@@ -1352,13 +1516,13 @@ interface paths {
1352
1516
  };
1353
1517
  /**
1354
1518
  * List an organization's members
1355
- * @description Lists the organization's members: each row is the member's identity, their single role in this organization, effective dates, when they joined, and `node_assignments`, the grants the member also holds at nodes beneath the organization (empty in a flat Environment). Paginated; `q` searches name and email. Requires the `rbac.view_assignments` permission at the organization.
1519
+ * @description Lists the organization's members: each row is the membership (its `status`, `source` and `joined_at`), the member's identity, and `roles`, every role assignment the member holds in the organization, at its node and beneath, with the node and the effective window. Active members by default; `status=deactivated` lists those who left and `status=all` both. Paginated; `q` searches name and email, `role_id` keeps members holding that role anywhere in the organization. Requires the `rbac.view_assignments` permission at the organization.
1356
1520
  */
1357
1521
  get: operations["ApiOrganizationsController_listMembers"];
1358
1522
  put?: never;
1359
1523
  /**
1360
1524
  * Add a member to an organization
1361
- * @description Adds a member: assigns `role_id` to `identity_id` at the organization. The identity must already hold an active membership in this Environment (invite by email instead for someone who does not). A member holds exactly one role per organization, so an identity that is already a member returns `409` — use the change-role operation. Requires the `rbac.manage_assignments` permission at the organization and emits `organization.member.added`. An organization's own administrator, signed in with an identity token and admitted by `canopy:organization.manage` alone, is refused with `403` (`organization.member_add_requires_invite`): the person never agreed to join, so the administrator invites them instead.
1525
+ * @description Adds a member. Membership is admission, not authority: with `role_id` the member also holds that role at the organization node from the start; without it they belong and hold nothing until a role is assigned. The identity must already hold an active membership in this Environment (invite by email instead for someone who does not). An identity that is already a member returns `409`; roles are added through the assignment routes. Requires the `rbac.manage_assignments` permission at the organization and emits `organization.member.added`. An organization's own administrator, signed in with an identity token and admitted by `canopy:organization.manage` alone, is refused with `403` (`organization.member_add_requires_invite`): the person never agreed to join, so the administrator invites them instead.
1362
1526
  */
1363
1527
  post: operations["ApiOrganizationsController_addMember"];
1364
1528
  delete?: never;
@@ -1379,16 +1543,12 @@ interface paths {
1379
1543
  post?: never;
1380
1544
  /**
1381
1545
  * Remove a member from an organization
1382
- * @description Removes the member from this organization, revoking their role here and nothing else — the identity and its memberships in other organizations are untouched. Returns `404` when the identity is not a member. Responds `204 No Content`, requires the `rbac.manage_assignments` permission at the organization, and emits `organization.member.removed`.
1546
+ * @description Removes the member from this organization: the membership is deactivated and every role assignment they hold at the organization's nodes goes with it, and nothing else; the identity and its memberships in other organizations are untouched. Returns `404` when the identity is not an active member and `409` when they are the last administrator. Responds `204 No Content`, requires the `rbac.manage_assignments` permission at the organization, and emits `organization.member.removed`.
1383
1547
  */
1384
1548
  delete: operations["ApiOrganizationsController_removeMember"];
1385
1549
  options?: never;
1386
1550
  head?: never;
1387
- /**
1388
- * Change a member's role
1389
- * @description Replaces the member's role in this organization with `role_id`. A member holds exactly one role per organization, so this updates the existing membership in place; changing to the role already held is a no-op. Returns `404` when the identity is not a member. Requires the `rbac.manage_assignments` permission at the organization and emits `organization.member.role_changed`.
1390
- */
1391
- patch: operations["ApiOrganizationsController_changeMemberRole"];
1551
+ patch?: never;
1392
1552
  trace?: never;
1393
1553
  };
1394
1554
  "/api/v1/organizations/{id}/members/{identityId}/mfa/reset": {
@@ -1444,7 +1604,7 @@ interface paths {
1444
1604
  };
1445
1605
  /**
1446
1606
  * List the roles an organization may assign
1447
- * @description The active, assignable roles of the organization's Environment, for choosing a member's role or an invitation's. System roles are left out, since they cannot be assigned. Requires `hierarchy.view` or `canopy:organization.manage` at the organization. The response is an unpaginated `{ items }` array.
1607
+ * @description The active, assignable roles of the organization's Environment, for choosing a member's role or an invitation's, each with `grantable`: whether the caller may grant it at the organization node under the grant ceiling (always true for the developer's key). System roles are left out, since they cannot be assigned. Requires `hierarchy.view`, `canopy:organization.manage` at the organization, or `canopy:access.manage` at the organization node. The response is an unpaginated `{ items }` array.
1448
1608
  */
1449
1609
  get: operations["ApiOrganizationsController_listRoles"];
1450
1610
  put?: never;
@@ -2504,6 +2664,7 @@ interface components {
2504
2664
  effective_node_id?: string | null;
2505
2665
  /** @description Ids of the roles whose assignments produced a node-scoped allow. Always empty for `scope_evaluated: "app_wide"`, whose answer is not tied to a node, and for a deny. */
2506
2666
  granting_roles: string[];
2667
+ /** @description Why the check was refused: `NO_ROLE_ASSIGNMENT`, `PERMISSION_NOT_GRANTED`, `NODE_SCOPE_VIOLATION`, `ROLE_EXPIRED`, `IDENTITY_INACTIVE`, `IDENTITY_NOT_ENV_MEMBER`, or `ORGANIZATION_MEMBERSHIP_INACTIVE` (assignments sit on the lineage inside an organization the identity's membership in is deactivated, so none count). Null on an allow. */
2507
2668
  denial_reason?: string | null;
2508
2669
  };
2509
2670
  EvaluatePermissionDto: {
@@ -2538,7 +2699,7 @@ interface components {
2538
2699
  assignment_id: string;
2539
2700
  role_id: string;
2540
2701
  role_name: string;
2541
- /** @description Whether the assignment counts right now: within its effective_from/effective_to window, and its role is active. An inactive role's assignments are kept but grant nothing. */
2702
+ /** @description Whether the assignment counts right now: within its effective_from/effective_to window, its role active, and, inside an organization, the holder's membership there active. An assignment that fails any of these is listed but grants nothing. */
2542
2703
  active: boolean;
2543
2704
  effective_from?: string | null;
2544
2705
  effective_to?: string | null;
@@ -2612,6 +2773,8 @@ interface components {
2612
2773
  effective_from: string | null;
2613
2774
  /** @description When this assignment expires; null means it never does */
2614
2775
  effective_to: string | null;
2776
+ /** @description Optimistic-lock version; send it back as `If-Match` */
2777
+ version: number;
2615
2778
  };
2616
2779
  IdentityRowDto: {
2617
2780
  id: string;
@@ -2758,6 +2921,8 @@ interface components {
2758
2921
  created_at: string;
2759
2922
  /** Format: date-time */
2760
2923
  updated_at: string;
2924
+ /** @description Optimistic-lock version; send it back as `If-Match` */
2925
+ version: number;
2761
2926
  };
2762
2927
  IdentityAccessibleNodesResponseDto: {
2763
2928
  /** @example reports.view */
@@ -2999,6 +3164,8 @@ interface components {
2999
3164
  status: "active" | "scheduled" | "expired";
3000
3165
  /** Format: date-time */
3001
3166
  created_at: string;
3167
+ /** @description Optimistic-lock version; send it back as `If-Match` */
3168
+ version: number;
3002
3169
  };
3003
3170
  IdentityAssignmentRowDto: {
3004
3171
  identity: components["schemas"]["AssignmentIdentityDto"];
@@ -3023,6 +3190,65 @@ interface components {
3023
3190
  distinct_role_count: number;
3024
3191
  recent_identities: components["schemas"]["RecentIdentityDto"][];
3025
3192
  };
3193
+ OrganizationAuthorityRootDto: {
3194
+ node_id: string;
3195
+ name: string;
3196
+ /** @description The node's type, as the schema names it */
3197
+ node_type: string;
3198
+ /** @description The names from the organization node down to this node's parent, so the node can be named in context; empty for the organization node itself */
3199
+ path: string[];
3200
+ };
3201
+ OrganizationMeResponseDto: {
3202
+ /** @description Holds `canopy:organization.manage` at the organization node, or is the developer's key */
3203
+ administers_organization: boolean;
3204
+ /** @description The topmost nodes where `canopy:access.manage` is held inside the organization; the organization node when `administers_organization` */
3205
+ access_roots: components["schemas"]["OrganizationAuthorityRootDto"][];
3206
+ /** @description The same for `canopy:structure.manage`, a key no role carries yet; always empty */
3207
+ structure_roots: components["schemas"]["OrganizationAuthorityRootDto"][];
3208
+ /** @description The same for `canopy:roles.manage`, a key no role carries yet; always empty */
3209
+ roles_roots: components["schemas"]["OrganizationAuthorityRootDto"][];
3210
+ /** @description Whether the Environment's schema allows nodes beneath an organization; false in a flat Environment, where the organization is its only node */
3211
+ has_hierarchy: boolean;
3212
+ };
3213
+ RoleResponseDto: {
3214
+ id: string;
3215
+ application_id: string;
3216
+ name: string;
3217
+ description?: string | null;
3218
+ is_system_role: boolean;
3219
+ system_key?: string | null;
3220
+ is_active: boolean;
3221
+ /** Format: date-time */
3222
+ created_at: string;
3223
+ /** Format: date-time */
3224
+ updated_at: string;
3225
+ /** @description Optimistic-lock version. Send back as the `If-Match` header when updating to detect concurrent edits. */
3226
+ version: number;
3227
+ /** @description Number of permissions currently assigned to this role. Populated on list responses; omitted on single-role responses where the join isn't computed. */
3228
+ permission_count?: number;
3229
+ /** @description Number of distinct identities assigned this role. Populated on list responses; omitted on single-role responses where the join isn't computed. */
3230
+ member_count?: number;
3231
+ };
3232
+ OrganizationMemberCandidateResponseDto: {
3233
+ identity: components["schemas"]["AssignmentIdentityDto"];
3234
+ };
3235
+ CreateOrganizationAssignmentDto: {
3236
+ /** @description A member of the organization */
3237
+ identity_id: string;
3238
+ /** @description The organization node, or a node beneath it; the identity must be an active member of the organization */
3239
+ node_id: string;
3240
+ /** @description An active, assignable role of the Environment */
3241
+ role_id: string;
3242
+ /** @description When the grant starts (ISO 8601); now when omitted */
3243
+ effective_from?: Record<string, unknown>;
3244
+ /** @description When the grant ends (ISO 8601); never when omitted */
3245
+ effective_to?: Record<string, unknown>;
3246
+ };
3247
+ UpdateAssignmentDto: {
3248
+ role_id: string;
3249
+ effective_from?: string | null;
3250
+ effective_to?: string | null;
3251
+ };
3026
3252
  OrganizationResponseDto: {
3027
3253
  id: string;
3028
3254
  name: string;
@@ -3032,7 +3258,7 @@ interface components {
3032
3258
  metadata: Record<string, unknown>;
3033
3259
  /** @description Your own id for this organization, unique per Environment. */
3034
3260
  external_id?: string | null;
3035
- /** @description Members (one role each) in this organization. */
3261
+ /** @description Active members of this organization, whatever roles they hold. */
3036
3262
  member_count: number;
3037
3263
  /** @description Unexpired, unaccepted, unrevoked invitations. */
3038
3264
  pending_invite_count: number;
@@ -3223,38 +3449,52 @@ interface components {
3223
3449
  name: string;
3224
3450
  node_type: string;
3225
3451
  };
3226
- OrganizationMemberNodeAssignmentDto: {
3452
+ OrganizationMemberAssignmentDto: {
3227
3453
  /** @description The assignment id. */
3228
3454
  id: string;
3229
- application_node: components["schemas"]["OrganizationMemberNodeDto"];
3230
- role: components["schemas"]["OrganizationMemberRoleDto"];
3231
- };
3232
- OrganizationMemberResponseDto: {
3233
- /** @description The membership (role assignment) id. */
3234
- id: string;
3235
- identity: components["schemas"]["OrganizationMemberIdentityDto"];
3236
3455
  role: components["schemas"]["OrganizationMemberRoleDto"];
3456
+ node: components["schemas"]["OrganizationMemberNodeDto"];
3237
3457
  /** Format: date-time */
3238
3458
  effective_from?: string | null;
3239
3459
  /** Format: date-time */
3240
3460
  effective_to?: string | null;
3461
+ /** @description The assignment's version, for `If-Match` on a change. */
3462
+ version: number;
3463
+ };
3464
+ OrganizationMemberResponseDto: {
3465
+ /** @description The membership id. */
3466
+ id: string;
3467
+ identity: components["schemas"]["OrganizationMemberIdentityDto"];
3468
+ /**
3469
+ * @description `active` while the identity belongs; `deactivated` once removed, kept for the organization's history.
3470
+ * @enum {string}
3471
+ */
3472
+ status: "active" | "deactivated";
3473
+ /**
3474
+ * @description How the membership began: added by an administrator, an accepted invitation, single sign-on, directory sync, or the organization's own creation on sign-up.
3475
+ * @enum {string}
3476
+ */
3477
+ source: "added" | "invitation" | "sso" | "directory_sync" | "signup";
3241
3478
  /**
3242
3479
  * Format: date-time
3243
- * @description When the membership was created.
3480
+ * @description When the current membership began.
3244
3481
  */
3245
- created_at: string;
3246
- /** @description Assignments the member also holds at nodes beneath the organization. Empty in a flat Environment. */
3247
- node_assignments: components["schemas"]["OrganizationMemberNodeAssignmentDto"][];
3482
+ joined_at: string;
3483
+ /**
3484
+ * Format: date-time
3485
+ * @description When the member was removed; null while active.
3486
+ */
3487
+ deactivated_at?: string | null;
3488
+ /** @description Every role assignment the member holds in the organization, the organization node first, then beneath it. Empty for a member who holds none. */
3489
+ roles: components["schemas"]["OrganizationMemberAssignmentDto"][];
3490
+ /** @description The membership's version. */
3491
+ version: number;
3248
3492
  };
3249
3493
  AddOrganizationMemberDto: {
3250
3494
  /** @description Identity to add. Must already hold an active membership in this Environment; invite by email instead for someone who does not. */
3251
3495
  identity_id: string;
3252
- /** @description The single role the member holds in this organization, from the Environment's roles. */
3253
- role_id: string;
3254
- };
3255
- ChangeOrganizationMemberRoleDto: {
3256
- /** @description The replacement role. A member holds exactly one role per organization, so this updates the existing membership in place. */
3257
- role_id: string;
3496
+ /** @description A role to hold at the organization node from the start, from the Environment's roles. Left out, the member belongs and holds nothing until a role is assigned. */
3497
+ role_id?: string;
3258
3498
  };
3259
3499
  CreateOrganizationInviteDto: {
3260
3500
  /** @description Email to invite. Works for people with no identity in this Environment — one is created when they accept. */
@@ -3269,7 +3509,7 @@ interface components {
3269
3509
  */
3270
3510
  send_email: boolean;
3271
3511
  };
3272
- RoleResponseDto: {
3512
+ OrganizationRoleResponseDto: {
3273
3513
  id: string;
3274
3514
  application_id: string;
3275
3515
  name: string;
@@ -3287,6 +3527,8 @@ interface components {
3287
3527
  permission_count?: number;
3288
3528
  /** @description Number of distinct identities assigned this role. Populated on list responses; omitted on single-role responses where the join isn't computed. */
3289
3529
  member_count?: number;
3530
+ /** @description Whether the caller may grant this role at the organization node under the grant ceiling: for an identity, it holds every permission the role carries there; always true for the developer's key and Console users */
3531
+ grantable: boolean;
3290
3532
  };
3291
3533
  SsoConnectionTestSummaryDto: {
3292
3534
  test_id: string;
@@ -3596,11 +3838,6 @@ interface components {
3596
3838
  effective_from?: string;
3597
3839
  effective_to?: string;
3598
3840
  };
3599
- UpdateAssignmentDto: {
3600
- role_id: string;
3601
- effective_from?: string | null;
3602
- effective_to?: string | null;
3603
- };
3604
3841
  BulkRemoveAssignmentsDto: {
3605
3842
  assignment_ids: string[];
3606
3843
  };
@@ -5041,16 +5278,21 @@ interface components {
5041
5278
  * @description The identity that joined.
5042
5279
  */
5043
5280
  identity_id: string;
5281
+ /** @description Your own identifier for the organization, when you set one. */
5282
+ external_id?: string | null;
5044
5283
  /**
5045
5284
  * Format: uuid
5046
- * @description The role it holds in the organization.
5285
+ * @description The membership record.
5047
5286
  */
5048
- role_id: string;
5049
- /** @description Your own identifier for the organization, when you set one. */
5050
- external_id?: string | null;
5287
+ membership_id?: string;
5051
5288
  /**
5052
5289
  * Format: uuid
5053
- * @description The role assignment that is the membership.
5290
+ * @description The role given at the organization node on joining, when one was.
5291
+ */
5292
+ role_id?: string;
5293
+ /**
5294
+ * Format: uuid
5295
+ * @description That role's assignment, when a role was given.
5054
5296
  */
5055
5297
  assignment_id?: string;
5056
5298
  /**
@@ -5072,7 +5314,7 @@ interface components {
5072
5314
  * @description How the member joined, when it was not added directly.
5073
5315
  * @enum {string}
5074
5316
  */
5075
- source?: "sso_jit" | "invite" | "scim";
5317
+ source?: "sso_jit" | "invite" | "scim" | "self_signup";
5076
5318
  };
5077
5319
  };
5078
5320
  };
@@ -5129,13 +5371,13 @@ interface components {
5129
5371
  * @description The identity removed.
5130
5372
  */
5131
5373
  identity_id: string;
5374
+ /** @description Role assignments it held at the organization's nodes, removed with the membership. */
5375
+ assignments_removed: number;
5132
5376
  /**
5133
5377
  * Format: uuid
5134
- * @description The role it held.
5378
+ * @description The membership record, now deactivated.
5135
5379
  */
5136
- role_id: string;
5137
- /** @description Grants it held beneath the organization, removed with the membership. */
5138
- scoped_assignments_removed: number;
5380
+ membership_id?: string;
5139
5381
  /**
5140
5382
  * @description Set when directory sync made the change rather than somebody directly.
5141
5383
  * @enum {string}
@@ -5583,8 +5825,7 @@ interface operations {
5583
5825
  ApiPermissionsController_deletePermission: {
5584
5826
  parameters: {
5585
5827
  query?: never;
5586
- header: {
5587
- "if-match": string;
5828
+ header?: {
5588
5829
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
5589
5830
  "If-Match"?: string;
5590
5831
  };
@@ -5712,8 +5953,7 @@ interface operations {
5712
5953
  ApiPermissionsController_updatePermission: {
5713
5954
  parameters: {
5714
5955
  query?: never;
5715
- header: {
5716
- "if-match": string;
5956
+ header?: {
5717
5957
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
5718
5958
  "If-Match"?: string;
5719
5959
  };
@@ -9843,8 +10083,7 @@ interface operations {
9843
10083
  ApiNodesController_deleteNode: {
9844
10084
  parameters: {
9845
10085
  query?: never;
9846
- header: {
9847
- "if-match": string;
10086
+ header?: {
9848
10087
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
9849
10088
  "If-Match"?: string;
9850
10089
  };
@@ -9972,8 +10211,7 @@ interface operations {
9972
10211
  ApiNodesController_updateNode: {
9973
10212
  parameters: {
9974
10213
  query?: never;
9975
- header: {
9976
- "if-match": string;
10214
+ header?: {
9977
10215
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
9978
10216
  "If-Match"?: string;
9979
10217
  };
@@ -10394,8 +10632,7 @@ interface operations {
10394
10632
  ApiNodesController_moveNode: {
10395
10633
  parameters: {
10396
10634
  query?: never;
10397
- header: {
10398
- "if-match": string;
10635
+ header?: {
10399
10636
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
10400
10637
  "If-Match"?: string;
10401
10638
  };
@@ -10633,8 +10870,1071 @@ interface operations {
10633
10870
  "application/json": components["schemas"]["ErrorResponseDto"];
10634
10871
  };
10635
10872
  };
10636
- /** @description Node not found */
10637
- 404: {
10873
+ /** @description Node not found */
10874
+ 404: {
10875
+ headers: {
10876
+ [name: string]: unknown;
10877
+ };
10878
+ content: {
10879
+ /**
10880
+ * @example {
10881
+ * "error": {
10882
+ * "statusCode": 404,
10883
+ * "code": null,
10884
+ * "message": "Node not found",
10885
+ * "timestamp": "2026-04-20T12:00:00.000Z",
10886
+ * "path": "/api/v1/nodes/{id}/identities",
10887
+ * "method": "GET"
10888
+ * }
10889
+ * }
10890
+ */
10891
+ "application/json": components["schemas"]["ErrorResponseDto"];
10892
+ };
10893
+ };
10894
+ };
10895
+ };
10896
+ ApiNodesController_getIdentityAssignmentsSummary: {
10897
+ parameters: {
10898
+ query?: never;
10899
+ header?: never;
10900
+ path: {
10901
+ id: string;
10902
+ };
10903
+ cookie?: never;
10904
+ };
10905
+ requestBody?: never;
10906
+ responses: {
10907
+ /** @description Identity counts by status returned */
10908
+ 200: {
10909
+ headers: {
10910
+ [name: string]: unknown;
10911
+ };
10912
+ content: {
10913
+ "application/json": {
10914
+ data: components["schemas"]["NodeIdentitiesSummaryDto"];
10915
+ };
10916
+ };
10917
+ };
10918
+ /** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header */
10919
+ 400: {
10920
+ headers: {
10921
+ [name: string]: unknown;
10922
+ };
10923
+ content: {
10924
+ /**
10925
+ * @example {
10926
+ * "error": {
10927
+ * "statusCode": 400,
10928
+ * "code": null,
10929
+ * "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header",
10930
+ * "timestamp": "2026-04-20T12:00:00.000Z",
10931
+ * "path": "/api/v1/nodes/{id}/identities/summary",
10932
+ * "method": "GET"
10933
+ * }
10934
+ * }
10935
+ */
10936
+ "application/json": components["schemas"]["ErrorResponseDto"];
10937
+ };
10938
+ };
10939
+ /** @description Invalid or expired token */
10940
+ 401: {
10941
+ headers: {
10942
+ [name: string]: unknown;
10943
+ };
10944
+ content: {
10945
+ /**
10946
+ * @example {
10947
+ * "error": {
10948
+ * "statusCode": 401,
10949
+ * "code": null,
10950
+ * "message": "Invalid or expired token",
10951
+ * "timestamp": "2026-04-20T12:00:00.000Z",
10952
+ * "path": "/api/v1/nodes",
10953
+ * "method": "GET"
10954
+ * }
10955
+ * }
10956
+ */
10957
+ "application/json": components["schemas"]["ErrorResponseDto"];
10958
+ };
10959
+ };
10960
+ /** @description The bearer token is not an admin or platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an admin without the Account capability that covers it, or, for a node-scoped check, a node outside this Environment */
10961
+ 403: {
10962
+ headers: {
10963
+ [name: string]: unknown;
10964
+ };
10965
+ content: {
10966
+ /**
10967
+ * @example {
10968
+ * "error": {
10969
+ * "statusCode": 403,
10970
+ * "code": null,
10971
+ * "message": "The bearer token is not an admin or platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an admin without the Account capability that covers it, or, for a node-scoped check, a node outside this Environment",
10972
+ * "timestamp": "2026-04-20T12:00:00.000Z",
10973
+ * "path": "/api/v1/nodes",
10974
+ * "method": "GET"
10975
+ * }
10976
+ * }
10977
+ */
10978
+ "application/json": components["schemas"]["ErrorResponseDto"];
10979
+ };
10980
+ };
10981
+ /** @description Node not found */
10982
+ 404: {
10983
+ headers: {
10984
+ [name: string]: unknown;
10985
+ };
10986
+ content: {
10987
+ /**
10988
+ * @example {
10989
+ * "error": {
10990
+ * "statusCode": 404,
10991
+ * "code": null,
10992
+ * "message": "Node not found",
10993
+ * "timestamp": "2026-04-20T12:00:00.000Z",
10994
+ * "path": "/api/v1/nodes/{id}/identities/summary",
10995
+ * "method": "GET"
10996
+ * }
10997
+ * }
10998
+ */
10999
+ "application/json": components["schemas"]["ErrorResponseDto"];
11000
+ };
11001
+ };
11002
+ };
11003
+ };
11004
+ ApiOrganizationAccessController_me: {
11005
+ parameters: {
11006
+ query?: never;
11007
+ header?: never;
11008
+ path: {
11009
+ id: string;
11010
+ };
11011
+ cookie?: never;
11012
+ };
11013
+ requestBody?: never;
11014
+ responses: {
11015
+ /** @description The caller's authority in the organization */
11016
+ 200: {
11017
+ headers: {
11018
+ [name: string]: unknown;
11019
+ };
11020
+ content: {
11021
+ "application/json": {
11022
+ data: components["schemas"]["OrganizationMeResponseDto"];
11023
+ };
11024
+ };
11025
+ };
11026
+ /** @description The request sent both an `X-API-Key` and an `Authorization` header; send one */
11027
+ 400: {
11028
+ headers: {
11029
+ [name: string]: unknown;
11030
+ };
11031
+ content: {
11032
+ /**
11033
+ * @example {
11034
+ * "error": {
11035
+ * "statusCode": 400,
11036
+ * "code": null,
11037
+ * "message": "The request sent both an `X-API-Key` and an `Authorization` header; send one",
11038
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11039
+ * "path": "/api/v1/organizations/{id}/me",
11040
+ * "method": "GET"
11041
+ * }
11042
+ * }
11043
+ */
11044
+ "application/json": components["schemas"]["ErrorResponseDto"];
11045
+ };
11046
+ };
11047
+ /** @description Invalid or expired token */
11048
+ 401: {
11049
+ headers: {
11050
+ [name: string]: unknown;
11051
+ };
11052
+ content: {
11053
+ /**
11054
+ * @example {
11055
+ * "error": {
11056
+ * "statusCode": 401,
11057
+ * "code": null,
11058
+ * "message": "Invalid or expired token",
11059
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11060
+ * "path": "/api/v1/organizations/{id}/me",
11061
+ * "method": "GET"
11062
+ * }
11063
+ * }
11064
+ */
11065
+ "application/json": components["schemas"]["ErrorResponseDto"];
11066
+ };
11067
+ };
11068
+ /** @description The caller holds no delegated key inside the organization and no developer key over it, or the token is not an admin, API key or identity token */
11069
+ 403: {
11070
+ headers: {
11071
+ [name: string]: unknown;
11072
+ };
11073
+ content: {
11074
+ /**
11075
+ * @example {
11076
+ * "error": {
11077
+ * "statusCode": 403,
11078
+ * "code": null,
11079
+ * "message": "The caller holds no delegated key inside the organization and no developer key over it, or the token is not an admin, API key or identity token",
11080
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11081
+ * "path": "/api/v1/organizations/{id}/me",
11082
+ * "method": "GET"
11083
+ * }
11084
+ * }
11085
+ */
11086
+ "application/json": components["schemas"]["ErrorResponseDto"];
11087
+ };
11088
+ };
11089
+ /** @description Organization not found */
11090
+ 404: {
11091
+ headers: {
11092
+ [name: string]: unknown;
11093
+ };
11094
+ content: {
11095
+ /**
11096
+ * @example {
11097
+ * "error": {
11098
+ * "statusCode": 404,
11099
+ * "code": null,
11100
+ * "message": "Organization not found",
11101
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11102
+ * "path": "/api/v1/organizations/{id}/me",
11103
+ * "method": "GET"
11104
+ * }
11105
+ * }
11106
+ */
11107
+ "application/json": components["schemas"]["ErrorResponseDto"];
11108
+ };
11109
+ };
11110
+ };
11111
+ };
11112
+ ApiOrganizationAccessController_tree: {
11113
+ parameters: {
11114
+ query?: {
11115
+ /** @description Page number (1-based) */
11116
+ page?: number;
11117
+ /** @description Items per page (1-100, default 20) */
11118
+ take?: number;
11119
+ /** @description Search node names and slugs */
11120
+ q?: string;
11121
+ /** @description Sort column. Defaults to `created`, oldest first. */
11122
+ sort_by?: "name" | "created";
11123
+ /** @description Sort direction */
11124
+ order?: "asc" | "desc";
11125
+ };
11126
+ header?: never;
11127
+ path: {
11128
+ id: string;
11129
+ };
11130
+ cookie?: never;
11131
+ };
11132
+ requestBody?: never;
11133
+ responses: {
11134
+ /** @description Nodes returned */
11135
+ 200: {
11136
+ headers: {
11137
+ [name: string]: unknown;
11138
+ };
11139
+ content: {
11140
+ "application/json": {
11141
+ items: components["schemas"]["ScopedNodeResponseDto"][];
11142
+ pagination: components["schemas"]["PageMetaDto"];
11143
+ };
11144
+ };
11145
+ };
11146
+ /** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header */
11147
+ 400: {
11148
+ headers: {
11149
+ [name: string]: unknown;
11150
+ };
11151
+ content: {
11152
+ /**
11153
+ * @example {
11154
+ * "error": {
11155
+ * "statusCode": 400,
11156
+ * "code": null,
11157
+ * "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header",
11158
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11159
+ * "path": "/api/v1/organizations/{id}/tree",
11160
+ * "method": "GET"
11161
+ * }
11162
+ * }
11163
+ */
11164
+ "application/json": components["schemas"]["ErrorResponseDto"];
11165
+ };
11166
+ };
11167
+ /** @description Invalid or expired token */
11168
+ 401: {
11169
+ headers: {
11170
+ [name: string]: unknown;
11171
+ };
11172
+ content: {
11173
+ /**
11174
+ * @example {
11175
+ * "error": {
11176
+ * "statusCode": 401,
11177
+ * "code": null,
11178
+ * "message": "Invalid or expired token",
11179
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11180
+ * "path": "/api/v1/organizations/{id}/me",
11181
+ * "method": "GET"
11182
+ * }
11183
+ * }
11184
+ */
11185
+ "application/json": components["schemas"]["ErrorResponseDto"];
11186
+ };
11187
+ };
11188
+ /** @description The caller holds no delegated key inside the organization and no developer key over it, or the token is not an admin, API key or identity token */
11189
+ 403: {
11190
+ headers: {
11191
+ [name: string]: unknown;
11192
+ };
11193
+ content: {
11194
+ /**
11195
+ * @example {
11196
+ * "error": {
11197
+ * "statusCode": 403,
11198
+ * "code": null,
11199
+ * "message": "The caller holds no delegated key inside the organization and no developer key over it, or the token is not an admin, API key or identity token",
11200
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11201
+ * "path": "/api/v1/organizations/{id}/tree",
11202
+ * "method": "GET"
11203
+ * }
11204
+ * }
11205
+ */
11206
+ "application/json": components["schemas"]["ErrorResponseDto"];
11207
+ };
11208
+ };
11209
+ /** @description Organization not found */
11210
+ 404: {
11211
+ headers: {
11212
+ [name: string]: unknown;
11213
+ };
11214
+ content: {
11215
+ /**
11216
+ * @example {
11217
+ * "error": {
11218
+ * "statusCode": 404,
11219
+ * "code": null,
11220
+ * "message": "Organization not found",
11221
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11222
+ * "path": "/api/v1/organizations/{id}/tree",
11223
+ * "method": "GET"
11224
+ * }
11225
+ * }
11226
+ */
11227
+ "application/json": components["schemas"]["ErrorResponseDto"];
11228
+ };
11229
+ };
11230
+ };
11231
+ };
11232
+ ApiOrganizationAccessController_listAccess: {
11233
+ parameters: {
11234
+ query?: {
11235
+ /** @description Page number (1-based) */
11236
+ page?: number;
11237
+ /** @description Items per page (1-100, default 20) */
11238
+ take?: number;
11239
+ /** @description Search term */
11240
+ q?: string;
11241
+ /** @description Sort field */
11242
+ sort_by?: "name" | "role" | "access_type" | "created_at";
11243
+ /** @description Sort order */
11244
+ order?: "asc" | "desc";
11245
+ /** @description Filter by role ID */
11246
+ role_id?: string;
11247
+ /** @description Filter by access type */
11248
+ access_type?: "direct" | "inherited";
11249
+ /** @description Filter by assignment status */
11250
+ status?: "active" | "scheduled" | "expired";
11251
+ /** @description Filter by source node ID */
11252
+ source_node_id?: string;
11253
+ };
11254
+ header?: never;
11255
+ path: {
11256
+ id: string;
11257
+ nodeId: string;
11258
+ };
11259
+ cookie?: never;
11260
+ };
11261
+ requestBody?: never;
11262
+ responses: {
11263
+ /** @description Assignments returned */
11264
+ 200: {
11265
+ headers: {
11266
+ [name: string]: unknown;
11267
+ };
11268
+ content: {
11269
+ "application/json": {
11270
+ items: components["schemas"]["IdentityAssignmentRowDto"][];
11271
+ pagination: components["schemas"]["PageMetaDto"];
11272
+ };
11273
+ };
11274
+ };
11275
+ /** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header */
11276
+ 400: {
11277
+ headers: {
11278
+ [name: string]: unknown;
11279
+ };
11280
+ content: {
11281
+ /**
11282
+ * @example {
11283
+ * "error": {
11284
+ * "statusCode": 400,
11285
+ * "code": null,
11286
+ * "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header",
11287
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11288
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/access",
11289
+ * "method": "GET"
11290
+ * }
11291
+ * }
11292
+ */
11293
+ "application/json": components["schemas"]["ErrorResponseDto"];
11294
+ };
11295
+ };
11296
+ /** @description Invalid or expired token */
11297
+ 401: {
11298
+ headers: {
11299
+ [name: string]: unknown;
11300
+ };
11301
+ content: {
11302
+ /**
11303
+ * @example {
11304
+ * "error": {
11305
+ * "statusCode": 401,
11306
+ * "code": null,
11307
+ * "message": "Invalid or expired token",
11308
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11309
+ * "path": "/api/v1/organizations/{id}/me",
11310
+ * "method": "GET"
11311
+ * }
11312
+ * }
11313
+ */
11314
+ "application/json": components["schemas"]["ErrorResponseDto"];
11315
+ };
11316
+ };
11317
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
11318
+ 403: {
11319
+ headers: {
11320
+ [name: string]: unknown;
11321
+ };
11322
+ content: {
11323
+ /**
11324
+ * @example {
11325
+ * "error": {
11326
+ * "statusCode": 403,
11327
+ * "code": null,
11328
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
11329
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11330
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/access",
11331
+ * "method": "GET"
11332
+ * }
11333
+ * }
11334
+ */
11335
+ "application/json": components["schemas"]["ErrorResponseDto"];
11336
+ };
11337
+ };
11338
+ /** @description The organization is not in this Environment, or the node is not inside it */
11339
+ 404: {
11340
+ headers: {
11341
+ [name: string]: unknown;
11342
+ };
11343
+ content: {
11344
+ /**
11345
+ * @example {
11346
+ * "error": {
11347
+ * "statusCode": 404,
11348
+ * "code": null,
11349
+ * "message": "The organization is not in this Environment, or the node is not inside it",
11350
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11351
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/access",
11352
+ * "method": "GET"
11353
+ * }
11354
+ * }
11355
+ */
11356
+ "application/json": components["schemas"]["ErrorResponseDto"];
11357
+ };
11358
+ };
11359
+ };
11360
+ };
11361
+ ApiOrganizationAccessController_accessSummary: {
11362
+ parameters: {
11363
+ query?: never;
11364
+ header?: never;
11365
+ path: {
11366
+ id: string;
11367
+ nodeId: string;
11368
+ };
11369
+ cookie?: never;
11370
+ };
11371
+ requestBody?: never;
11372
+ responses: {
11373
+ /** @description Summary returned */
11374
+ 200: {
11375
+ headers: {
11376
+ [name: string]: unknown;
11377
+ };
11378
+ content: {
11379
+ "application/json": {
11380
+ data: components["schemas"]["NodeIdentitiesSummaryDto"];
11381
+ };
11382
+ };
11383
+ };
11384
+ /** @description The request sent both an `X-API-Key` and an `Authorization` header; send one */
11385
+ 400: {
11386
+ headers: {
11387
+ [name: string]: unknown;
11388
+ };
11389
+ content: {
11390
+ /**
11391
+ * @example {
11392
+ * "error": {
11393
+ * "statusCode": 400,
11394
+ * "code": null,
11395
+ * "message": "The request sent both an `X-API-Key` and an `Authorization` header; send one",
11396
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11397
+ * "path": "/api/v1/organizations/{id}/me",
11398
+ * "method": "GET"
11399
+ * }
11400
+ * }
11401
+ */
11402
+ "application/json": components["schemas"]["ErrorResponseDto"];
11403
+ };
11404
+ };
11405
+ /** @description Invalid or expired token */
11406
+ 401: {
11407
+ headers: {
11408
+ [name: string]: unknown;
11409
+ };
11410
+ content: {
11411
+ /**
11412
+ * @example {
11413
+ * "error": {
11414
+ * "statusCode": 401,
11415
+ * "code": null,
11416
+ * "message": "Invalid or expired token",
11417
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11418
+ * "path": "/api/v1/organizations/{id}/me",
11419
+ * "method": "GET"
11420
+ * }
11421
+ * }
11422
+ */
11423
+ "application/json": components["schemas"]["ErrorResponseDto"];
11424
+ };
11425
+ };
11426
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
11427
+ 403: {
11428
+ headers: {
11429
+ [name: string]: unknown;
11430
+ };
11431
+ content: {
11432
+ /**
11433
+ * @example {
11434
+ * "error": {
11435
+ * "statusCode": 403,
11436
+ * "code": null,
11437
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
11438
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11439
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/access",
11440
+ * "method": "GET"
11441
+ * }
11442
+ * }
11443
+ */
11444
+ "application/json": components["schemas"]["ErrorResponseDto"];
11445
+ };
11446
+ };
11447
+ /** @description The organization is not in this Environment, or the node is not inside it */
11448
+ 404: {
11449
+ headers: {
11450
+ [name: string]: unknown;
11451
+ };
11452
+ content: {
11453
+ /**
11454
+ * @example {
11455
+ * "error": {
11456
+ * "statusCode": 404,
11457
+ * "code": null,
11458
+ * "message": "The organization is not in this Environment, or the node is not inside it",
11459
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11460
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/access/summary",
11461
+ * "method": "GET"
11462
+ * }
11463
+ * }
11464
+ */
11465
+ "application/json": components["schemas"]["ErrorResponseDto"];
11466
+ };
11467
+ };
11468
+ };
11469
+ };
11470
+ ApiOrganizationAccessController_grantableRoles: {
11471
+ parameters: {
11472
+ query?: never;
11473
+ header?: never;
11474
+ path: {
11475
+ id: string;
11476
+ nodeId: string;
11477
+ };
11478
+ cookie?: never;
11479
+ };
11480
+ requestBody?: never;
11481
+ responses: {
11482
+ /** @description Roles returned */
11483
+ 200: {
11484
+ headers: {
11485
+ [name: string]: unknown;
11486
+ };
11487
+ content: {
11488
+ "application/json": {
11489
+ items: components["schemas"]["RoleResponseDto"][];
11490
+ };
11491
+ };
11492
+ };
11493
+ /** @description The request sent both an `X-API-Key` and an `Authorization` header; send one */
11494
+ 400: {
11495
+ headers: {
11496
+ [name: string]: unknown;
11497
+ };
11498
+ content: {
11499
+ /**
11500
+ * @example {
11501
+ * "error": {
11502
+ * "statusCode": 400,
11503
+ * "code": null,
11504
+ * "message": "The request sent both an `X-API-Key` and an `Authorization` header; send one",
11505
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11506
+ * "path": "/api/v1/organizations/{id}/me",
11507
+ * "method": "GET"
11508
+ * }
11509
+ * }
11510
+ */
11511
+ "application/json": components["schemas"]["ErrorResponseDto"];
11512
+ };
11513
+ };
11514
+ /** @description Invalid or expired token */
11515
+ 401: {
11516
+ headers: {
11517
+ [name: string]: unknown;
11518
+ };
11519
+ content: {
11520
+ /**
11521
+ * @example {
11522
+ * "error": {
11523
+ * "statusCode": 401,
11524
+ * "code": null,
11525
+ * "message": "Invalid or expired token",
11526
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11527
+ * "path": "/api/v1/organizations/{id}/me",
11528
+ * "method": "GET"
11529
+ * }
11530
+ * }
11531
+ */
11532
+ "application/json": components["schemas"]["ErrorResponseDto"];
11533
+ };
11534
+ };
11535
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
11536
+ 403: {
11537
+ headers: {
11538
+ [name: string]: unknown;
11539
+ };
11540
+ content: {
11541
+ /**
11542
+ * @example {
11543
+ * "error": {
11544
+ * "statusCode": 403,
11545
+ * "code": null,
11546
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
11547
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11548
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/access",
11549
+ * "method": "GET"
11550
+ * }
11551
+ * }
11552
+ */
11553
+ "application/json": components["schemas"]["ErrorResponseDto"];
11554
+ };
11555
+ };
11556
+ /** @description The organization is not in this Environment, or the node is not inside it */
11557
+ 404: {
11558
+ headers: {
11559
+ [name: string]: unknown;
11560
+ };
11561
+ content: {
11562
+ /**
11563
+ * @example {
11564
+ * "error": {
11565
+ * "statusCode": 404,
11566
+ * "code": null,
11567
+ * "message": "The organization is not in this Environment, or the node is not inside it",
11568
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11569
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/grantable-roles",
11570
+ * "method": "GET"
11571
+ * }
11572
+ * }
11573
+ */
11574
+ "application/json": components["schemas"]["ErrorResponseDto"];
11575
+ };
11576
+ };
11577
+ };
11578
+ };
11579
+ ApiOrganizationAccessController_listMembersAt: {
11580
+ parameters: {
11581
+ query?: {
11582
+ /** @description Page number (1-based) */
11583
+ page?: number;
11584
+ /** @description Items per page (1-100, default 20) */
11585
+ take?: number;
11586
+ /** @description Search member names and emails */
11587
+ q?: string;
11588
+ /** @description Sort column. Defaults to `joined`, longest-standing member first. */
11589
+ sort_by?: "name" | "email" | "joined";
11590
+ /** @description Sort direction */
11591
+ order?: "asc" | "desc";
11592
+ };
11593
+ header?: never;
11594
+ path: {
11595
+ id: string;
11596
+ nodeId: string;
11597
+ };
11598
+ cookie?: never;
11599
+ };
11600
+ requestBody?: never;
11601
+ responses: {
11602
+ /** @description Members returned */
11603
+ 200: {
11604
+ headers: {
11605
+ [name: string]: unknown;
11606
+ };
11607
+ content: {
11608
+ "application/json": {
11609
+ items: components["schemas"]["OrganizationMemberCandidateResponseDto"][];
11610
+ pagination: components["schemas"]["PageMetaDto"];
11611
+ };
11612
+ };
11613
+ };
11614
+ /** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header */
11615
+ 400: {
11616
+ headers: {
11617
+ [name: string]: unknown;
11618
+ };
11619
+ content: {
11620
+ /**
11621
+ * @example {
11622
+ * "error": {
11623
+ * "statusCode": 400,
11624
+ * "code": null,
11625
+ * "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header",
11626
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11627
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/members",
11628
+ * "method": "GET"
11629
+ * }
11630
+ * }
11631
+ */
11632
+ "application/json": components["schemas"]["ErrorResponseDto"];
11633
+ };
11634
+ };
11635
+ /** @description Invalid or expired token */
11636
+ 401: {
11637
+ headers: {
11638
+ [name: string]: unknown;
11639
+ };
11640
+ content: {
11641
+ /**
11642
+ * @example {
11643
+ * "error": {
11644
+ * "statusCode": 401,
11645
+ * "code": null,
11646
+ * "message": "Invalid or expired token",
11647
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11648
+ * "path": "/api/v1/organizations/{id}/me",
11649
+ * "method": "GET"
11650
+ * }
11651
+ * }
11652
+ */
11653
+ "application/json": components["schemas"]["ErrorResponseDto"];
11654
+ };
11655
+ };
11656
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
11657
+ 403: {
11658
+ headers: {
11659
+ [name: string]: unknown;
11660
+ };
11661
+ content: {
11662
+ /**
11663
+ * @example {
11664
+ * "error": {
11665
+ * "statusCode": 403,
11666
+ * "code": null,
11667
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
11668
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11669
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/access",
11670
+ * "method": "GET"
11671
+ * }
11672
+ * }
11673
+ */
11674
+ "application/json": components["schemas"]["ErrorResponseDto"];
11675
+ };
11676
+ };
11677
+ /** @description The organization is not in this Environment, or the node is not inside it */
11678
+ 404: {
11679
+ headers: {
11680
+ [name: string]: unknown;
11681
+ };
11682
+ content: {
11683
+ /**
11684
+ * @example {
11685
+ * "error": {
11686
+ * "statusCode": 404,
11687
+ * "code": null,
11688
+ * "message": "The organization is not in this Environment, or the node is not inside it",
11689
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11690
+ * "path": "/api/v1/organizations/{id}/nodes/{nodeId}/members",
11691
+ * "method": "GET"
11692
+ * }
11693
+ * }
11694
+ */
11695
+ "application/json": components["schemas"]["ErrorResponseDto"];
11696
+ };
11697
+ };
11698
+ };
11699
+ };
11700
+ ApiOrganizationAccessController_createAssignment: {
11701
+ parameters: {
11702
+ query?: never;
11703
+ header?: never;
11704
+ path: {
11705
+ id: string;
11706
+ };
11707
+ cookie?: never;
11708
+ };
11709
+ requestBody: {
11710
+ content: {
11711
+ "application/json": components["schemas"]["CreateOrganizationAssignmentDto"];
11712
+ };
11713
+ };
11714
+ responses: {
11715
+ /** @description Assignment created */
11716
+ 201: {
11717
+ headers: {
11718
+ [name: string]: unknown;
11719
+ };
11720
+ content: {
11721
+ "application/json": {
11722
+ data: components["schemas"]["AssignmentResponseDto"];
11723
+ };
11724
+ };
11725
+ };
11726
+ /** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header */
11727
+ 400: {
11728
+ headers: {
11729
+ [name: string]: unknown;
11730
+ };
11731
+ content: {
11732
+ /**
11733
+ * @example {
11734
+ * "error": {
11735
+ * "statusCode": 400,
11736
+ * "code": null,
11737
+ * "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header",
11738
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11739
+ * "path": "/api/v1/organizations/{id}/assignments",
11740
+ * "method": "POST"
11741
+ * }
11742
+ * }
11743
+ */
11744
+ "application/json": components["schemas"]["ErrorResponseDto"];
11745
+ };
11746
+ };
11747
+ /** @description Invalid or expired token */
11748
+ 401: {
11749
+ headers: {
11750
+ [name: string]: unknown;
11751
+ };
11752
+ content: {
11753
+ /**
11754
+ * @example {
11755
+ * "error": {
11756
+ * "statusCode": 401,
11757
+ * "code": null,
11758
+ * "message": "Invalid or expired token",
11759
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11760
+ * "path": "/api/v1/organizations/{id}/me",
11761
+ * "method": "GET"
11762
+ * }
11763
+ * }
11764
+ */
11765
+ "application/json": components["schemas"]["ErrorResponseDto"];
11766
+ };
11767
+ };
11768
+ /** @description The token is not an admin, API key or identity token, or the caller holds none of the keys the operation needs at the node, or is an identity outside the grant ceiling for the role (`assignment.grant_ceiling`) */
11769
+ 403: {
11770
+ headers: {
11771
+ [name: string]: unknown;
11772
+ };
11773
+ content: {
11774
+ /**
11775
+ * @example {
11776
+ * "error": {
11777
+ * "statusCode": 403,
11778
+ * "code": null,
11779
+ * "message": "The token is not an admin, API key or identity token, or the caller holds none of the keys the operation needs at the node, or is an identity outside the grant ceiling for the role (`assignment.grant_ceiling`)",
11780
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11781
+ * "path": "/api/v1/organizations/{id}/assignments",
11782
+ * "method": "POST"
11783
+ * }
11784
+ * }
11785
+ */
11786
+ "application/json": components["schemas"]["ErrorResponseDto"];
11787
+ };
11788
+ };
11789
+ /** @description The organization is not in this Environment, or the node is not inside it */
11790
+ 404: {
11791
+ headers: {
11792
+ [name: string]: unknown;
11793
+ };
11794
+ content: {
11795
+ /**
11796
+ * @example {
11797
+ * "error": {
11798
+ * "statusCode": 404,
11799
+ * "code": null,
11800
+ * "message": "The organization is not in this Environment, or the node is not inside it",
11801
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11802
+ * "path": "/api/v1/organizations/{id}/assignments",
11803
+ * "method": "POST"
11804
+ * }
11805
+ * }
11806
+ */
11807
+ "application/json": components["schemas"]["ErrorResponseDto"];
11808
+ };
11809
+ };
11810
+ /** @description The identity already holds this role at this node, or is not a member of the organization (`organization.membership_required`) */
11811
+ 409: {
11812
+ headers: {
11813
+ [name: string]: unknown;
11814
+ };
11815
+ content: {
11816
+ /**
11817
+ * @example {
11818
+ * "error": {
11819
+ * "statusCode": 409,
11820
+ * "code": null,
11821
+ * "message": "The identity already holds this role at this node, or is not a member of the organization (`organization.membership_required`)",
11822
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11823
+ * "path": "/api/v1/organizations/{id}/assignments",
11824
+ * "method": "POST"
11825
+ * }
11826
+ * }
11827
+ */
11828
+ "application/json": components["schemas"]["ErrorResponseDto"];
11829
+ };
11830
+ };
11831
+ };
11832
+ };
11833
+ ApiOrganizationAccessController_removeAssignment: {
11834
+ parameters: {
11835
+ query?: never;
11836
+ header?: never;
11837
+ path: {
11838
+ id: string;
11839
+ assignmentId: string;
11840
+ };
11841
+ cookie?: never;
11842
+ };
11843
+ requestBody?: never;
11844
+ responses: {
11845
+ /** @description Assignment removed */
11846
+ 204: {
11847
+ headers: {
11848
+ [name: string]: unknown;
11849
+ };
11850
+ content?: never;
11851
+ };
11852
+ /** @description The request sent both an `X-API-Key` and an `Authorization` header; send one */
11853
+ 400: {
11854
+ headers: {
11855
+ [name: string]: unknown;
11856
+ };
11857
+ content: {
11858
+ /**
11859
+ * @example {
11860
+ * "error": {
11861
+ * "statusCode": 400,
11862
+ * "code": null,
11863
+ * "message": "The request sent both an `X-API-Key` and an `Authorization` header; send one",
11864
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11865
+ * "path": "/api/v1/organizations/{id}/me",
11866
+ * "method": "GET"
11867
+ * }
11868
+ * }
11869
+ */
11870
+ "application/json": components["schemas"]["ErrorResponseDto"];
11871
+ };
11872
+ };
11873
+ /** @description Invalid or expired token */
11874
+ 401: {
11875
+ headers: {
11876
+ [name: string]: unknown;
11877
+ };
11878
+ content: {
11879
+ /**
11880
+ * @example {
11881
+ * "error": {
11882
+ * "statusCode": 401,
11883
+ * "code": null,
11884
+ * "message": "Invalid or expired token",
11885
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11886
+ * "path": "/api/v1/organizations/{id}/me",
11887
+ * "method": "GET"
11888
+ * }
11889
+ * }
11890
+ */
11891
+ "application/json": components["schemas"]["ErrorResponseDto"];
11892
+ };
11893
+ };
11894
+ /** @description The token is not an admin, API key or identity token, or the caller holds none of the keys the operation needs at the node */
11895
+ 403: {
11896
+ headers: {
11897
+ [name: string]: unknown;
11898
+ };
11899
+ content: {
11900
+ /**
11901
+ * @example {
11902
+ * "error": {
11903
+ * "statusCode": 403,
11904
+ * "code": null,
11905
+ * "message": "The token is not an admin, API key or identity token, or the caller holds none of the keys the operation needs at the node",
11906
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11907
+ * "path": "/api/v1/organizations/{id}/assignments/{assignmentId}",
11908
+ * "method": "DELETE"
11909
+ * }
11910
+ * }
11911
+ */
11912
+ "application/json": components["schemas"]["ErrorResponseDto"];
11913
+ };
11914
+ };
11915
+ /** @description The organization is not in this Environment, or the assignment is not at one of its nodes */
11916
+ 404: {
11917
+ headers: {
11918
+ [name: string]: unknown;
11919
+ };
11920
+ content: {
11921
+ /**
11922
+ * @example {
11923
+ * "error": {
11924
+ * "statusCode": 404,
11925
+ * "code": null,
11926
+ * "message": "The organization is not in this Environment, or the assignment is not at one of its nodes",
11927
+ * "timestamp": "2026-04-20T12:00:00.000Z",
11928
+ * "path": "/api/v1/organizations/{id}/assignments/{assignmentId}",
11929
+ * "method": "DELETE"
11930
+ * }
11931
+ * }
11932
+ */
11933
+ "application/json": components["schemas"]["ErrorResponseDto"];
11934
+ };
11935
+ };
11936
+ /** @description The member is the organization's last administrator (`organization.last_admin`); make someone else one first */
11937
+ 409: {
10638
11938
  headers: {
10639
11939
  [name: string]: unknown;
10640
11940
  };
@@ -10642,12 +11942,12 @@ interface operations {
10642
11942
  /**
10643
11943
  * @example {
10644
11944
  * "error": {
10645
- * "statusCode": 404,
11945
+ * "statusCode": 409,
10646
11946
  * "code": null,
10647
- * "message": "Node not found",
11947
+ * "message": "The member is the organization's last administrator (`organization.last_admin`); make someone else one first",
10648
11948
  * "timestamp": "2026-04-20T12:00:00.000Z",
10649
- * "path": "/api/v1/nodes/{id}/identities",
10650
- * "method": "GET"
11949
+ * "path": "/api/v1/organizations/{id}/assignments/{assignmentId}",
11950
+ * "method": "DELETE"
10651
11951
  * }
10652
11952
  * }
10653
11953
  */
@@ -10656,25 +11956,33 @@ interface operations {
10656
11956
  };
10657
11957
  };
10658
11958
  };
10659
- ApiNodesController_getIdentityAssignmentsSummary: {
11959
+ ApiOrganizationAccessController_updateAssignment: {
10660
11960
  parameters: {
10661
11961
  query?: never;
10662
- header?: never;
11962
+ header?: {
11963
+ /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
11964
+ "If-Match"?: string;
11965
+ };
10663
11966
  path: {
10664
11967
  id: string;
11968
+ assignmentId: string;
10665
11969
  };
10666
11970
  cookie?: never;
10667
11971
  };
10668
- requestBody?: never;
11972
+ requestBody: {
11973
+ content: {
11974
+ "application/json": components["schemas"]["UpdateAssignmentDto"];
11975
+ };
11976
+ };
10669
11977
  responses: {
10670
- /** @description Identity counts by status returned */
11978
+ /** @description Assignment updated */
10671
11979
  200: {
10672
11980
  headers: {
10673
11981
  [name: string]: unknown;
10674
11982
  };
10675
11983
  content: {
10676
11984
  "application/json": {
10677
- data: components["schemas"]["NodeIdentitiesSummaryDto"];
11985
+ data: components["schemas"]["AssignmentResponseDto"];
10678
11986
  };
10679
11987
  };
10680
11988
  };
@@ -10691,8 +11999,8 @@ interface operations {
10691
11999
  * "code": null,
10692
12000
  * "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header",
10693
12001
  * "timestamp": "2026-04-20T12:00:00.000Z",
10694
- * "path": "/api/v1/nodes/{id}/identities/summary",
10695
- * "method": "GET"
12002
+ * "path": "/api/v1/organizations/{id}/assignments/{assignmentId}",
12003
+ * "method": "PATCH"
10696
12004
  * }
10697
12005
  * }
10698
12006
  */
@@ -10712,7 +12020,7 @@ interface operations {
10712
12020
  * "code": null,
10713
12021
  * "message": "Invalid or expired token",
10714
12022
  * "timestamp": "2026-04-20T12:00:00.000Z",
10715
- * "path": "/api/v1/nodes",
12023
+ * "path": "/api/v1/organizations/{id}/me",
10716
12024
  * "method": "GET"
10717
12025
  * }
10718
12026
  * }
@@ -10720,7 +12028,7 @@ interface operations {
10720
12028
  "application/json": components["schemas"]["ErrorResponseDto"];
10721
12029
  };
10722
12030
  };
10723
- /** @description The bearer token is not an admin or platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an admin without the Account capability that covers it, or, for a node-scoped check, a node outside this Environment */
12031
+ /** @description The token is not an admin, API key or identity token, or the caller holds none of the keys the operation needs at the node, or is an identity outside the grant ceiling for the role (`assignment.grant_ceiling`) */
10724
12032
  403: {
10725
12033
  headers: {
10726
12034
  [name: string]: unknown;
@@ -10731,17 +12039,17 @@ interface operations {
10731
12039
  * "error": {
10732
12040
  * "statusCode": 403,
10733
12041
  * "code": null,
10734
- * "message": "The bearer token is not an admin or platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an admin without the Account capability that covers it, or, for a node-scoped check, a node outside this Environment",
12042
+ * "message": "The token is not an admin, API key or identity token, or the caller holds none of the keys the operation needs at the node, or is an identity outside the grant ceiling for the role (`assignment.grant_ceiling`)",
10735
12043
  * "timestamp": "2026-04-20T12:00:00.000Z",
10736
- * "path": "/api/v1/nodes",
10737
- * "method": "GET"
12044
+ * "path": "/api/v1/organizations/{id}/assignments/{assignmentId}",
12045
+ * "method": "PATCH"
10738
12046
  * }
10739
12047
  * }
10740
12048
  */
10741
12049
  "application/json": components["schemas"]["ErrorResponseDto"];
10742
12050
  };
10743
12051
  };
10744
- /** @description Node not found */
12052
+ /** @description The organization is not in this Environment, or the assignment is not at one of its nodes */
10745
12053
  404: {
10746
12054
  headers: {
10747
12055
  [name: string]: unknown;
@@ -10752,10 +12060,31 @@ interface operations {
10752
12060
  * "error": {
10753
12061
  * "statusCode": 404,
10754
12062
  * "code": null,
10755
- * "message": "Node not found",
12063
+ * "message": "The organization is not in this Environment, or the assignment is not at one of its nodes",
10756
12064
  * "timestamp": "2026-04-20T12:00:00.000Z",
10757
- * "path": "/api/v1/nodes/{id}/identities/summary",
10758
- * "method": "GET"
12065
+ * "path": "/api/v1/organizations/{id}/assignments/{assignmentId}",
12066
+ * "method": "PATCH"
12067
+ * }
12068
+ * }
12069
+ */
12070
+ "application/json": components["schemas"]["ErrorResponseDto"];
12071
+ };
12072
+ };
12073
+ /** @description The identity already holds this role at this node, the assignment has been modified since the version named in If-Match was read (`assignment.version_mismatch`), or it is the last administrator's role at the organization node (`organization.last_admin`) */
12074
+ 409: {
12075
+ headers: {
12076
+ [name: string]: unknown;
12077
+ };
12078
+ content: {
12079
+ /**
12080
+ * @example {
12081
+ * "error": {
12082
+ * "statusCode": 409,
12083
+ * "code": null,
12084
+ * "message": "The identity already holds this role at this node, the assignment has been modified since the version named in If-Match was read (`assignment.version_mismatch`), or it is the last administrator's role at the organization node (`organization.last_admin`)",
12085
+ * "timestamp": "2026-04-20T12:00:00.000Z",
12086
+ * "path": "/api/v1/organizations/{id}/assignments/{assignmentId}",
12087
+ * "method": "PATCH"
10759
12088
  * }
10760
12089
  * }
10761
12090
  */
@@ -11165,8 +12494,7 @@ interface operations {
11165
12494
  ApiOrganizationsController_deleteOrganization: {
11166
12495
  parameters: {
11167
12496
  query?: never;
11168
- header: {
11169
- "if-match": string;
12497
+ header?: {
11170
12498
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
11171
12499
  "If-Match"?: string;
11172
12500
  };
@@ -11294,8 +12622,7 @@ interface operations {
11294
12622
  ApiOrganizationsController_updateOrganization: {
11295
12623
  parameters: {
11296
12624
  query?: never;
11297
- header: {
11298
- "if-match": string;
12625
+ header?: {
11299
12626
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
11300
12627
  "If-Match"?: string;
11301
12628
  };
@@ -11539,8 +12866,7 @@ interface operations {
11539
12866
  ApiOrganizationsController_updatePolicy: {
11540
12867
  parameters: {
11541
12868
  query?: never;
11542
- header: {
11543
- "if-match": string;
12869
+ header?: {
11544
12870
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
11545
12871
  "If-Match"?: string;
11546
12872
  };
@@ -12850,14 +14176,14 @@ interface operations {
12850
14176
  take?: number;
12851
14177
  /** @description Search member names and emails */
12852
14178
  q?: string;
12853
- /** @description Sort column. Defaults to `created`, oldest membership first. */
12854
- sort_by?: "name" | "email" | "role" | "created";
14179
+ /** @description Sort column. Defaults to `joined`, longest-standing member first. */
14180
+ sort_by?: "name" | "email" | "joined";
12855
14181
  /** @description Sort direction */
12856
14182
  order?: "asc" | "desc";
12857
- /** @description Only members holding this role */
14183
+ /** @description Only members holding this role anywhere in the organization, at its node or beneath */
12858
14184
  role_id?: string;
12859
- /** @description Filter by the membership's effective window: active now, scheduled to start, or already expired */
12860
- status?: "active" | "scheduled" | "expired";
14185
+ /** @description Which memberships to list: `active` (the default), `deactivated` for members who left, or `all` */
14186
+ status?: "active" | "deactivated" | "all";
12861
14187
  };
12862
14188
  header?: never;
12863
14189
  path: {
@@ -13075,7 +14401,7 @@ interface operations {
13075
14401
  "application/json": components["schemas"]["ErrorResponseDto"];
13076
14402
  };
13077
14403
  };
13078
- /** @description The identity is already a member of this organization */
14404
+ /** @description The identity is already a member of this organization (`organization.member_exists`); give them a role through the assignment routes */
13079
14405
  409: {
13080
14406
  headers: {
13081
14407
  [name: string]: unknown;
@@ -13086,7 +14412,7 @@ interface operations {
13086
14412
  * "error": {
13087
14413
  * "statusCode": 409,
13088
14414
  * "code": null,
13089
- * "message": "The identity is already a member of this organization",
14415
+ * "message": "The identity is already a member of this organization (`organization.member_exists`); give them a role through the assignment routes",
13090
14416
  * "timestamp": "2026-04-20T12:00:00.000Z",
13091
14417
  * "path": "/api/v1/organizations/{id}/members",
13092
14418
  * "method": "POST"
@@ -13224,140 +14550,6 @@ interface operations {
13224
14550
  };
13225
14551
  };
13226
14552
  };
13227
- ApiOrganizationsController_changeMemberRole: {
13228
- parameters: {
13229
- query?: never;
13230
- header?: never;
13231
- path: {
13232
- id: string;
13233
- identityId: string;
13234
- };
13235
- cookie?: never;
13236
- };
13237
- requestBody: {
13238
- content: {
13239
- "application/json": components["schemas"]["ChangeOrganizationMemberRoleDto"];
13240
- };
13241
- };
13242
- responses: {
13243
- /** @description Member role changed */
13244
- 200: {
13245
- headers: {
13246
- [name: string]: unknown;
13247
- };
13248
- content: {
13249
- "application/json": {
13250
- data: components["schemas"]["OrganizationMemberResponseDto"];
13251
- };
13252
- };
13253
- };
13254
- /** @description The request failed validation, or the role is inactive or a system role; or the request sent both an `X-API-Key` and an `Authorization` header */
13255
- 400: {
13256
- headers: {
13257
- [name: string]: unknown;
13258
- };
13259
- content: {
13260
- /**
13261
- * @example {
13262
- * "error": {
13263
- * "statusCode": 400,
13264
- * "code": null,
13265
- * "message": "The request failed validation, or the role is inactive or a system role; or the request sent both an `X-API-Key` and an `Authorization` header",
13266
- * "timestamp": "2026-04-20T12:00:00.000Z",
13267
- * "path": "/api/v1/organizations/{id}/members/{identityId}",
13268
- * "method": "PATCH"
13269
- * }
13270
- * }
13271
- */
13272
- "application/json": components["schemas"]["ErrorResponseDto"];
13273
- };
13274
- };
13275
- /** @description Invalid or expired token */
13276
- 401: {
13277
- headers: {
13278
- [name: string]: unknown;
13279
- };
13280
- content: {
13281
- /**
13282
- * @example {
13283
- * "error": {
13284
- * "statusCode": 401,
13285
- * "code": null,
13286
- * "message": "Invalid or expired token",
13287
- * "timestamp": "2026-04-20T12:00:00.000Z",
13288
- * "path": "/api/v1/organizations",
13289
- * "method": "GET"
13290
- * }
13291
- * }
13292
- */
13293
- "application/json": components["schemas"]["ErrorResponseDto"];
13294
- };
13295
- };
13296
- /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
13297
- 403: {
13298
- headers: {
13299
- [name: string]: unknown;
13300
- };
13301
- content: {
13302
- /**
13303
- * @example {
13304
- * "error": {
13305
- * "statusCode": 403,
13306
- * "code": null,
13307
- * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
13308
- * "timestamp": "2026-04-20T12:00:00.000Z",
13309
- * "path": "/api/v1/organizations",
13310
- * "method": "GET"
13311
- * }
13312
- * }
13313
- */
13314
- "application/json": components["schemas"]["ErrorResponseDto"];
13315
- };
13316
- };
13317
- /** @description The organization or the role does not exist, or the identity is not a member of this organization */
13318
- 404: {
13319
- headers: {
13320
- [name: string]: unknown;
13321
- };
13322
- content: {
13323
- /**
13324
- * @example {
13325
- * "error": {
13326
- * "statusCode": 404,
13327
- * "code": null,
13328
- * "message": "The organization or the role does not exist, or the identity is not a member of this organization",
13329
- * "timestamp": "2026-04-20T12:00:00.000Z",
13330
- * "path": "/api/v1/organizations/{id}/members/{identityId}",
13331
- * "method": "PATCH"
13332
- * }
13333
- * }
13334
- */
13335
- "application/json": components["schemas"]["ErrorResponseDto"];
13336
- };
13337
- };
13338
- /** @description The member is the organization's last administrator (`organization.last_admin`); make someone else one first */
13339
- 409: {
13340
- headers: {
13341
- [name: string]: unknown;
13342
- };
13343
- content: {
13344
- /**
13345
- * @example {
13346
- * "error": {
13347
- * "statusCode": 409,
13348
- * "code": null,
13349
- * "message": "The member is the organization's last administrator (`organization.last_admin`); make someone else one first",
13350
- * "timestamp": "2026-04-20T12:00:00.000Z",
13351
- * "path": "/api/v1/organizations/{id}/members/{identityId}",
13352
- * "method": "PATCH"
13353
- * }
13354
- * }
13355
- */
13356
- "application/json": components["schemas"]["ErrorResponseDto"];
13357
- };
13358
- };
13359
- };
13360
- };
13361
14553
  ApiOrganizationsController_resetMemberMfa: {
13362
14554
  parameters: {
13363
14555
  query?: never;
@@ -13674,7 +14866,7 @@ interface operations {
13674
14866
  "application/json": components["schemas"]["ErrorResponseDto"];
13675
14867
  };
13676
14868
  };
13677
- /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
14869
+ /** @description The token is not an admin, API key or identity token, or the caller is an identity that does not hold, at the organization node or above, every permission the role carries (`assignment.grant_ceiling`); Console users and API keys are not bounded */
13678
14870
  403: {
13679
14871
  headers: {
13680
14872
  [name: string]: unknown;
@@ -13685,10 +14877,10 @@ interface operations {
13685
14877
  * "error": {
13686
14878
  * "statusCode": 403,
13687
14879
  * "code": null,
13688
- * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
14880
+ * "message": "The token is not an admin, API key or identity token, or the caller is an identity that does not hold, at the organization node or above, every permission the role carries (`assignment.grant_ceiling`); Console users and API keys are not bounded",
13689
14881
  * "timestamp": "2026-04-20T12:00:00.000Z",
13690
- * "path": "/api/v1/organizations",
13691
- * "method": "GET"
14882
+ * "path": "/api/v1/organizations/{id}/invites",
14883
+ * "method": "POST"
13692
14884
  * }
13693
14885
  * }
13694
14886
  */
@@ -13757,7 +14949,7 @@ interface operations {
13757
14949
  };
13758
14950
  content: {
13759
14951
  "application/json": {
13760
- items: components["schemas"]["RoleResponseDto"][];
14952
+ items: components["schemas"]["OrganizationRoleResponseDto"][];
13761
14953
  };
13762
14954
  };
13763
14955
  };
@@ -17031,8 +18223,7 @@ interface operations {
17031
18223
  ApiRolesController_deleteRole: {
17032
18224
  parameters: {
17033
18225
  query?: never;
17034
- header: {
17035
- "if-match": string;
18226
+ header?: {
17036
18227
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
17037
18228
  "If-Match"?: string;
17038
18229
  };
@@ -17160,8 +18351,7 @@ interface operations {
17160
18351
  ApiRolesController_updateRole: {
17161
18352
  parameters: {
17162
18353
  query?: never;
17163
- header: {
17164
- "if-match": string;
18354
+ header?: {
17165
18355
  /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
17166
18356
  "If-Match"?: string;
17167
18357
  };
@@ -17810,7 +19000,7 @@ interface operations {
17810
19000
  "application/json": components["schemas"]["ErrorResponseDto"];
17811
19001
  };
17812
19002
  };
17813
- /** @description The identity already has this role at this node, already holds its one role at this organization, or the node sits beneath an organization the identity has no membership in effect at */
19003
+ /** @description The identity already has this role at this node, or the node sits beneath an organization the identity is not an active member of (`organization.membership_required`) */
17814
19004
  409: {
17815
19005
  headers: {
17816
19006
  [name: string]: unknown;
@@ -17821,7 +19011,7 @@ interface operations {
17821
19011
  * "error": {
17822
19012
  * "statusCode": 409,
17823
19013
  * "code": null,
17824
- * "message": "The identity already has this role at this node, already holds its one role at this organization, or the node sits beneath an organization the identity has no membership in effect at",
19014
+ * "message": "The identity already has this role at this node, or the node sits beneath an organization the identity is not an active member of (`organization.membership_required`)",
17825
19015
  * "timestamp": "2026-04-20T12:00:00.000Z",
17826
19016
  * "path": "/api/v1/assignments",
17827
19017
  * "method": "POST"
@@ -17935,12 +19125,36 @@ interface operations {
17935
19125
  "application/json": components["schemas"]["ErrorResponseDto"];
17936
19126
  };
17937
19127
  };
19128
+ /** @description The member is the organization's last administrator (`organization.last_admin`); make someone else one first */
19129
+ 409: {
19130
+ headers: {
19131
+ [name: string]: unknown;
19132
+ };
19133
+ content: {
19134
+ /**
19135
+ * @example {
19136
+ * "error": {
19137
+ * "statusCode": 409,
19138
+ * "code": null,
19139
+ * "message": "The member is the organization's last administrator (`organization.last_admin`); make someone else one first",
19140
+ * "timestamp": "2026-04-20T12:00:00.000Z",
19141
+ * "path": "/api/v1/assignments/{id}",
19142
+ * "method": "DELETE"
19143
+ * }
19144
+ * }
19145
+ */
19146
+ "application/json": components["schemas"]["ErrorResponseDto"];
19147
+ };
19148
+ };
17938
19149
  };
17939
19150
  };
17940
19151
  ApiAssignmentsController_updateAssignment: {
17941
19152
  parameters: {
17942
19153
  query?: never;
17943
- header?: never;
19154
+ header?: {
19155
+ /** @description Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since. */
19156
+ "If-Match"?: string;
19157
+ };
17944
19158
  path: {
17945
19159
  id: string;
17946
19160
  };
@@ -18047,7 +19261,7 @@ interface operations {
18047
19261
  "application/json": components["schemas"]["ErrorResponseDto"];
18048
19262
  };
18049
19263
  };
18050
- /** @description Identity already has this role at this node */
19264
+ /** @description The identity already holds this role at this node, the assignment has been modified since the version named in If-Match was read (`assignment.version_mismatch`), or the role is the last administrator's at an organization node (`organization.last_admin`) */
18051
19265
  409: {
18052
19266
  headers: {
18053
19267
  [name: string]: unknown;
@@ -18058,7 +19272,7 @@ interface operations {
18058
19272
  * "error": {
18059
19273
  * "statusCode": 409,
18060
19274
  * "code": null,
18061
- * "message": "Identity already has this role at this node",
19275
+ * "message": "The identity already holds this role at this node, the assignment has been modified since the version named in If-Match was read (`assignment.version_mismatch`), or the role is the last administrator's at an organization node (`organization.last_admin`)",
18062
19276
  * "timestamp": "2026-04-20T12:00:00.000Z",
18063
19277
  * "path": "/api/v1/assignments/{id}",
18064
19278
  * "method": "PATCH"
@@ -18174,6 +19388,27 @@ interface operations {
18174
19388
  "application/json": components["schemas"]["ErrorResponseDto"];
18175
19389
  };
18176
19390
  };
19391
+ /** @description The member is the organization's last administrator (`organization.last_admin`); make someone else one first */
19392
+ 409: {
19393
+ headers: {
19394
+ [name: string]: unknown;
19395
+ };
19396
+ content: {
19397
+ /**
19398
+ * @example {
19399
+ * "error": {
19400
+ * "statusCode": 409,
19401
+ * "code": null,
19402
+ * "message": "The member is the organization's last administrator (`organization.last_admin`); make someone else one first",
19403
+ * "timestamp": "2026-04-20T12:00:00.000Z",
19404
+ * "path": "/api/v1/assignments/bulk-remove",
19405
+ * "method": "POST"
19406
+ * }
19407
+ * }
19408
+ */
19409
+ "application/json": components["schemas"]["ErrorResponseDto"];
19410
+ };
19411
+ };
18177
19412
  };
18178
19413
  };
18179
19414
  ApiAssignmentsController_bulkChangeRole: {
@@ -18284,7 +19519,7 @@ interface operations {
18284
19519
  "application/json": components["schemas"]["ErrorResponseDto"];
18285
19520
  };
18286
19521
  };
18287
- /** @description Identity already has this role at this node */
19522
+ /** @description The identity already holds this role at this node, the assignment has been modified since the version named in If-Match was read (`assignment.version_mismatch`), or the role is the last administrator's at an organization node (`organization.last_admin`) */
18288
19523
  409: {
18289
19524
  headers: {
18290
19525
  [name: string]: unknown;
@@ -18295,7 +19530,7 @@ interface operations {
18295
19530
  * "error": {
18296
19531
  * "statusCode": 409,
18297
19532
  * "code": null,
18298
- * "message": "Identity already has this role at this node",
19533
+ * "message": "The identity already holds this role at this node, the assignment has been modified since the version named in If-Match was read (`assignment.version_mismatch`), or the role is the last administrator's at an organization node (`organization.last_admin`)",
18299
19534
  * "timestamp": "2026-04-20T12:00:00.000Z",
18300
19535
  * "path": "/api/v1/assignments/bulk-change-role",
18301
19536
  * "method": "POST"
@@ -19241,8 +20476,7 @@ interface operations {
19241
20476
  ApiHierarchySchemaController_updateSchema: {
19242
20477
  parameters: {
19243
20478
  query?: never;
19244
- header: {
19245
- "if-match": string;
20479
+ header?: {
19246
20480
  /** @description Optimistic-lock token. Pass the `version` you read from the Environment — request fails 409 when the row has moved on. */
19247
20481
  "If-Match"?: string;
19248
20482
  };
@@ -21646,7 +22880,12 @@ declare class Assignments {
21646
22880
  * answer, read the current assignments before retrying.
21647
22881
  */
21648
22882
  create(input: RequestBody<"ApiAssignmentsController_assignRole">): Promise<ResponseBody<"ApiAssignmentsController_assignRole">>;
21649
- update(id: string, input: RequestBody<"ApiAssignmentsController_updateAssignment">): Promise<ResponseBody<"ApiAssignmentsController_updateAssignment">>;
22883
+ /**
22884
+ * Change the role or the window of a grant. Pass the `version` the
22885
+ * assignment was read with as `ifMatch`; a stale one answers 409
22886
+ * `assignment.version_mismatch` rather than overwriting a newer change.
22887
+ */
22888
+ update(id: string, input: RequestBody<"ApiAssignmentsController_updateAssignment">, options?: ConcurrencyOptions): Promise<ResponseBody<"ApiAssignmentsController_updateAssignment">>;
21650
22889
  delete(id: string): Promise<void>;
21651
22890
  /**
21652
22891
  * Grant many at once. Answers 207 with a per-item result rather than failing
@@ -21750,8 +22989,8 @@ type ItemOf$3<T> = T extends {
21750
22989
  } ? Item : never;
21751
22990
 
21752
22991
  /**
21753
- * Tenant organizations: one per business customer, a role per membership,
21754
- * each with its own authentication policy and identity provider. Every
22992
+ * Tenant organizations: one per business customer, membership apart from
22993
+ * the roles held inside it, each with its own authentication policy and identity provider. Every
21755
22994
  * call here needs the Environment's organizations container switched on.
21756
22995
  */
21757
22996
  declare class Organizations {
@@ -21776,8 +23015,12 @@ declare class Organizations {
21776
23015
  deleteAll(): Promise<void>;
21777
23016
  listMembers(id: string, query?: QueryParams<"ApiOrganizationsController_listMembers">): Paginator<OrganizationMemberItem>;
21778
23017
  addMember(id: string, input: RequestBody<"ApiOrganizationsController_addMember">): Promise<ResponseBody<"ApiOrganizationsController_addMember">>;
21779
- changeMemberRole(id: string, identityId: string, input: RequestBody<"ApiOrganizationsController_changeMemberRole">): Promise<ResponseBody<"ApiOrganizationsController_changeMemberRole">>;
21780
- /** Revokes that organization's one role; the identity and its other memberships are untouched. */
23018
+ /**
23019
+ * Deactivates the membership and revokes every role the member holds at
23020
+ * the organization's nodes; the identity and its other memberships are
23021
+ * untouched. A role in the organization is changed through the
23022
+ * organization's assignment routes, not here.
23023
+ */
21781
23024
  removeMember(id: string, identityId: string): Promise<void>;
21782
23025
  /**
21783
23026
  * Clears a member's second factor, for one who lost their authenticator:
@@ -22579,23 +23822,28 @@ interface CanopyTokenClaims {
22579
23822
  * The organization this session is acting in — present only on identity
22580
23823
  * tokens from an Environment with the organizations container on, for an
22581
23824
  * identity that belongs to at least one organization. Always minted
22582
- * together with `org_role`; read the pair through {@link orgContext}
23825
+ * together with `org_roles`; read the pair through {@link orgContext}
22583
23826
  * rather than separately.
22584
23827
  */
22585
23828
  org_id?: string;
22586
- /** The name of the single role the identity holds in `org_id`. */
22587
- org_role?: string;
23829
+ /**
23830
+ * The names of the roles the identity holds at the organization's own node,
23831
+ * sorted; empty for a member who holds none there. Membership is admission,
23832
+ * not a role: a member may hold roles only beneath the organization, or
23833
+ * none at all.
23834
+ */
23835
+ org_roles?: string[];
22588
23836
  [claim: string]: unknown;
22589
23837
  }
22590
23838
  /**
22591
23839
  * The organization context a verified token carries: which organization the
22592
- * session is acting in, and the one role it holds there.
23840
+ * session is acting in, and the roles it holds at that organization's node.
22593
23841
  */
22594
23842
  interface CanopyOrgContext {
22595
23843
  /** The organization's id — also a hierarchy node id, usable as `node_id`. */
22596
23844
  orgId: string;
22597
- /** The role's name (not its id): what `org_role` carries. */
22598
- orgRole: string;
23845
+ /** The roles' names (not ids) held at the organization node: what `org_roles` carries. Empty for a member holding none there. */
23846
+ orgRoles: string[];
22599
23847
  }
22600
23848
  /**
22601
23849
  * The organization context of a verified token, or `null` when it has none.
@@ -22603,16 +23851,18 @@ interface CanopyOrgContext {
22603
23851
  * `null` is an ordinary answer, not a failure: it is every token from an
22604
23852
  * Environment without the organizations container on, and every identity
22605
23853
  * that belongs to no organization yet. Branch on it rather than on the raw claims —
22606
- * Canopy mints `org_id` and `org_role` together, and this helper refuses a
23854
+ * Canopy mints `org_id` and `org_roles` together, and this helper refuses a
22607
23855
  * half-present pair instead of letting one claim be read as though the other
22608
- * were there.
23856
+ * were there. An empty `orgRoles` is a member of the organization holding no
23857
+ * role at its node; authorize such a session by evaluating, never by the
23858
+ * list's length.
22609
23859
  *
22610
23860
  * ```ts
22611
23861
  * const claims = await verifier.verify(token);
22612
23862
  * const org = orgContext(claims);
22613
23863
  *
22614
23864
  * if (org) {
22615
- * // acting inside org.orgId as org.orgRole
23865
+ * // acting inside org.orgId, holding org.orgRoles at its node
22616
23866
  * }
22617
23867
  * ```
22618
23868
  */