@canopy-io/node 0.2.0 → 0.3.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
@@ -898,7 +898,7 @@ interface paths {
898
898
  put?: never;
899
899
  /**
900
900
  * Create a hierarchy node
901
- * @description Creates a hierarchy node in the active Application's current Environment. Authorization is evaluated against `hierarchy.manage` on the parent node when `parent_node_id` is supplied, or Application-wide when creating the root. The node type and the parent/child relationship are validated against the Environment's hierarchy schema, only one root node is permitted per Environment (a second returns `409`), and the configured `max_depth` is enforced; a missing `slug` is derived from the name. Returns `201` with the created node and writes a `node.created` audit row.
901
+ * @description Creates a hierarchy node in the active Application's current Environment. Prerequisite: the Environment must have a hierarchy schema — define it first via `PATCH /api/v1/hierarchy-schema` (or the Console's enable-hierarchy wizard), or this endpoint returns `400` ("Hierarchy schema is not configured"). Authorization is evaluated against `hierarchy.manage` on the parent node when `parent_node_id` is supplied, or Application-wide when creating the root. The node type and the parent/child relationship are validated against the schema, only one root node is permitted per Environment (a second returns `409`), and the configured `max_depth` is enforced; a missing `slug` is derived from the name. Returns `201` with the created node and writes a `node.created` audit row.
902
902
  */
903
903
  post: operations["ApiNodesController_createNode"];
904
904
  delete?: never;
@@ -1075,6 +1075,222 @@ interface paths {
1075
1075
  patch?: never;
1076
1076
  trace?: never;
1077
1077
  };
1078
+ "/api/v1/organizations": {
1079
+ parameters: {
1080
+ query?: never;
1081
+ header?: never;
1082
+ path?: never;
1083
+ cookie?: never;
1084
+ };
1085
+ /**
1086
+ * List organizations
1087
+ * @description Lists the Environment's organizations with `member_count` and `pending_invite_count` per row, paginated and searchable by name or slug (`q`). Empty while the Environment has organizations disabled. Requires the `hierarchy.view` permission.
1088
+ */
1089
+ get: operations["ApiOrganizationsController_listOrganizations"];
1090
+ put?: never;
1091
+ /**
1092
+ * Create an organization
1093
+ * @description Creates an organization from a `name` (slug auto-derived, display-only) with optional `description` and `metadata`. The Environment must have organizations enabled (`409 organization.not_enabled` otherwise); the container is independent of the access model, so flat and hierarchy Environments both hold organizations. Requires the `hierarchy.manage` permission and emits `organization.created`.
1094
+ */
1095
+ post: operations["ApiOrganizationsController_createOrganization"];
1096
+ /**
1097
+ * Delete every organization
1098
+ * @description Deletes every live organization in the Environment the way the single delete does: memberships and every assignment beneath each organization are removed, pending invitations bound to the organization or its tree are revoked, and each organization is soft-deleted with its subtree. Member identities are untouched. This is the step before switching the container off. Responds `204 No Content`, requires the `hierarchy.manage` permission, and emits `organization.deleted_all` with the counts.
1099
+ */
1100
+ delete: operations["ApiOrganizationsController_deleteAllOrganizations"];
1101
+ options?: never;
1102
+ head?: never;
1103
+ patch?: never;
1104
+ trace?: never;
1105
+ };
1106
+ "/api/v1/organizations/{id}": {
1107
+ parameters: {
1108
+ query?: never;
1109
+ header?: never;
1110
+ path?: never;
1111
+ cookie?: never;
1112
+ };
1113
+ /**
1114
+ * Get an organization
1115
+ * @description Returns a single organization by `id` with `member_count` and `pending_invite_count`. Returns `404` when the id does not name a live organization in the current Environment. Requires the `hierarchy.view` permission at the organization.
1116
+ */
1117
+ get: operations["ApiOrganizationsController_getOrganization"];
1118
+ put?: never;
1119
+ post?: never;
1120
+ /**
1121
+ * Delete an organization
1122
+ * @description Deletes an organization by `id`: removes every membership and every assignment beneath the organization, revokes every pending invitation bound to it or its tree, and soft-deletes the organization with its subtree. Member identities themselves are untouched and keep their memberships in other organizations. Supports optimistic concurrency via the `If-Match` header (`409` on a version mismatch). Responds `204 No Content`, requires the `hierarchy.manage` permission at the organization, and emits `organization.deleted`.
1123
+ */
1124
+ delete: operations["ApiOrganizationsController_deleteOrganization"];
1125
+ options?: never;
1126
+ head?: never;
1127
+ /**
1128
+ * Update an organization
1129
+ * @description Updates an organization's `name`, `description`, and/or `metadata` by `id`. The slug is frozen at create and never changes. Supports optimistic concurrency via the `If-Match` header carrying the organization's current version (`409` on a version mismatch). Requires the `hierarchy.manage` permission at the organization and emits `organization.updated`.
1130
+ */
1131
+ patch: operations["ApiOrganizationsController_updateOrganization"];
1132
+ trace?: never;
1133
+ };
1134
+ "/api/v1/organizations/{id}/policy": {
1135
+ parameters: {
1136
+ query?: never;
1137
+ header?: never;
1138
+ path?: never;
1139
+ cookie?: never;
1140
+ };
1141
+ /**
1142
+ * Get an organization's authentication policy
1143
+ * @description Returns the organization's own authentication policy (null fields inherit the Environment) alongside the effective policy its members sign in under. Requires the `hierarchy.view` permission at the organization.
1144
+ */
1145
+ get: operations["ApiOrganizationsController_getPolicy"];
1146
+ put?: never;
1147
+ post?: never;
1148
+ delete?: never;
1149
+ options?: never;
1150
+ head?: never;
1151
+ /**
1152
+ * Update an organization's authentication policy
1153
+ * @description Sets the organization's own authentication policy. A field set to `null` inherits the Environment again. The policy can only tighten the Environment's settings: `mfa_required` can be true where the Environment leaves MFA optional, `mfa_factor_allowlist` must be a subset of the Environment's, `mfa_after_sso` can be `require` where the Environment exempts, and `require_sso` refuses password and code logins for members. Returns `400` (`organization.policy_loosens`) when a value would loosen the Environment, `409` when `If-Match` does not match the policy version. Requires the `hierarchy.manage` permission at the organization and emits `organization.policy.updated`.
1154
+ */
1155
+ patch: operations["ApiOrganizationsController_updatePolicy"];
1156
+ trace?: never;
1157
+ };
1158
+ "/api/v1/organizations/{id}/sso-connections": {
1159
+ parameters: {
1160
+ query?: never;
1161
+ header?: never;
1162
+ path?: never;
1163
+ cookie?: never;
1164
+ };
1165
+ /**
1166
+ * List an organization's SSO connections
1167
+ * @description Lists the end-user SSO connections bound to this organization, oldest first, each with the membership role a just-in-time provisioned login receives. Requires the `hierarchy.view` permission at the organization. The response is an unpaginated `{ items }` array.
1168
+ */
1169
+ get: operations["ApiOrganizationsController_listSsoConnections"];
1170
+ put?: never;
1171
+ /**
1172
+ * Bind an SSO connection to an organization
1173
+ * @description Binds an `end_user` SSO connection to the organization: a login through the connection lands in this organization, joining as a member with `default_role_id` when the identity is provisioned or is not yet a member, and the session starts here. The connection must already be bound to the organization's Environment (that binding routes the email domain), and the role must belong to the Environment (`400` otherwise). A connection binds to one organization per Environment (`409`). Requires the `hierarchy.manage` permission at the organization and emits `organization.sso_connection.bound`.
1174
+ */
1175
+ post: operations["ApiOrganizationsController_bindSsoConnection"];
1176
+ delete?: never;
1177
+ options?: never;
1178
+ head?: never;
1179
+ patch?: never;
1180
+ trace?: never;
1181
+ };
1182
+ "/api/v1/organizations/{id}/sso-connections/{connectionId}": {
1183
+ parameters: {
1184
+ query?: never;
1185
+ header?: never;
1186
+ path?: never;
1187
+ cookie?: never;
1188
+ };
1189
+ get?: never;
1190
+ put?: never;
1191
+ post?: never;
1192
+ /**
1193
+ * Unbind an SSO connection from an organization
1194
+ * @description Removes the binding; logins through the connection fall back to the Environment's placement. Existing memberships are untouched. Returns `404` when the connection is not bound to this organization. Requires the `hierarchy.manage` permission at the organization and emits `organization.sso_connection.unbound`.
1195
+ */
1196
+ delete: operations["ApiOrganizationsController_unbindSsoConnection"];
1197
+ options?: never;
1198
+ head?: never;
1199
+ patch?: never;
1200
+ trace?: never;
1201
+ };
1202
+ "/api/v1/organizations/{id}/members": {
1203
+ parameters: {
1204
+ query?: never;
1205
+ header?: never;
1206
+ path?: never;
1207
+ cookie?: never;
1208
+ };
1209
+ /**
1210
+ * List an organization's members
1211
+ * @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.
1212
+ */
1213
+ get: operations["ApiOrganizationsController_listMembers"];
1214
+ put?: never;
1215
+ /**
1216
+ * Add a member to an organization
1217
+ * @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`.
1218
+ */
1219
+ post: operations["ApiOrganizationsController_addMember"];
1220
+ delete?: never;
1221
+ options?: never;
1222
+ head?: never;
1223
+ patch?: never;
1224
+ trace?: never;
1225
+ };
1226
+ "/api/v1/organizations/{id}/members/{identityId}": {
1227
+ parameters: {
1228
+ query?: never;
1229
+ header?: never;
1230
+ path?: never;
1231
+ cookie?: never;
1232
+ };
1233
+ get?: never;
1234
+ put?: never;
1235
+ post?: never;
1236
+ /**
1237
+ * Remove a member from an organization
1238
+ * @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`.
1239
+ */
1240
+ delete: operations["ApiOrganizationsController_removeMember"];
1241
+ options?: never;
1242
+ head?: never;
1243
+ /**
1244
+ * Change a member's role
1245
+ * @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`.
1246
+ */
1247
+ patch: operations["ApiOrganizationsController_changeMemberRole"];
1248
+ trace?: never;
1249
+ };
1250
+ "/api/v1/organizations/{id}/invites": {
1251
+ parameters: {
1252
+ query?: never;
1253
+ header?: never;
1254
+ path?: never;
1255
+ cookie?: never;
1256
+ };
1257
+ /**
1258
+ * List an organization's invitations
1259
+ * @description Lists the organization's invitations (pending, accepted, revoked, and expired — filter with `status`), paginated. Requires the `identity.view` permission.
1260
+ */
1261
+ get: operations["ApiOrganizationsController_listInvites"];
1262
+ put?: never;
1263
+ /**
1264
+ * Invite a member into an organization
1265
+ * @description Invites an email into the organization with the role bound to the invitation; acceptance creates the Environment membership and the organization membership in one step. Works for emails with no identity in the Environment — one is created on acceptance. Requires the `identity.manage` permission and emits `invite.created`.
1266
+ */
1267
+ post: operations["ApiOrganizationsController_createInvite"];
1268
+ delete?: never;
1269
+ options?: never;
1270
+ head?: never;
1271
+ patch?: never;
1272
+ trace?: never;
1273
+ };
1274
+ "/api/v1/organizations/{id}/invites/{inviteId}": {
1275
+ parameters: {
1276
+ query?: never;
1277
+ header?: never;
1278
+ path?: never;
1279
+ cookie?: never;
1280
+ };
1281
+ get?: never;
1282
+ put?: never;
1283
+ post?: never;
1284
+ /**
1285
+ * Revoke an organization invitation
1286
+ * @description Revokes an invitation on this organization; the emailed link stops working immediately. Returns `404` when the invitation does not belong to this organization. Requires the `identity.manage` permission and emits `invite.revoked`.
1287
+ */
1288
+ delete: operations["ApiOrganizationsController_revokeInvite"];
1289
+ options?: never;
1290
+ head?: never;
1291
+ patch?: never;
1292
+ trace?: never;
1293
+ };
1078
1294
  "/api/v1/roles": {
1079
1295
  parameters: {
1080
1296
  query?: never;
@@ -2149,6 +2365,163 @@ interface components {
2149
2365
  distinct_role_count: number;
2150
2366
  recent_identities: components["schemas"]["RecentIdentityDto"][];
2151
2367
  };
2368
+ OrganizationResponseDto: {
2369
+ id: string;
2370
+ name: string;
2371
+ description?: string | null;
2372
+ /** @description Display label derived from the name at create; frozen afterwards. Organizations are addressed by `id`. */
2373
+ slug: string;
2374
+ metadata: Record<string, unknown>;
2375
+ /** @description Members (one role each) in this organization. */
2376
+ member_count: number;
2377
+ /** @description Unexpired, unaccepted, unrevoked invitations. */
2378
+ pending_invite_count: number;
2379
+ /** Format: date-time */
2380
+ created_at: string;
2381
+ /** Format: date-time */
2382
+ updated_at: string;
2383
+ /** @description Optimistic-lock version. Send back as the `If-Match` header when updating or deleting to detect concurrent edits. */
2384
+ version: number;
2385
+ };
2386
+ CreateOrganizationDto: {
2387
+ /** @description Organization name. The slug is auto-derived from it at create and never changes afterwards. */
2388
+ name: string;
2389
+ /** @description Organization description */
2390
+ description?: string;
2391
+ /** @description Free-form metadata stored on the organization, returned as sent. */
2392
+ metadata?: Record<string, unknown>;
2393
+ };
2394
+ UpdateOrganizationDto: {
2395
+ /** @description New organization name. The slug does not change. */
2396
+ name?: string;
2397
+ /** @description Organization description */
2398
+ description?: string;
2399
+ /** @description Free-form metadata stored on the organization, returned as sent. */
2400
+ metadata?: Record<string, unknown>;
2401
+ };
2402
+ EffectiveOrganizationPolicyDto: {
2403
+ mfa_required: boolean;
2404
+ mfa_factor_allowlist: ("totp" | "webauthn" | "email_otp")[];
2405
+ /** @enum {string} */
2406
+ mfa_after_sso: "exempt" | "require";
2407
+ require_sso: boolean;
2408
+ };
2409
+ OrganizationPolicyResponseDto: {
2410
+ /** @description The organization this policy belongs to. */
2411
+ organization_id: string;
2412
+ mfa_required?: boolean | null;
2413
+ mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[] | null;
2414
+ /** @enum {string|null} */
2415
+ mfa_after_sso?: "exempt" | "require" | null;
2416
+ require_sso: boolean;
2417
+ /** @description The Environment's own settings, the floor this organization's policy tightens from. */
2418
+ environment: components["schemas"]["EffectiveOrganizationPolicyDto"];
2419
+ /** @description The policy the organization's members sign in under. */
2420
+ effective: components["schemas"]["EffectiveOrganizationPolicyDto"];
2421
+ /** @description Optimistic-concurrency version. 0 until the organization sets a policy of its own. */
2422
+ version: number;
2423
+ };
2424
+ UpdateOrganizationPolicyDto: {
2425
+ /** @description Require MFA for this organization's members. `true` tightens an Environment that leaves MFA optional; `false` is only accepted where the Environment does not require MFA; `null` inherits. */
2426
+ mfa_required?: boolean | null;
2427
+ /** @description Factors this organization's members may enroll and use. Must be a non-empty subset of the Environment's allowlist; `null` inherits. */
2428
+ mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[] | null;
2429
+ /**
2430
+ * @description Whether an SSO login still owes an MFA challenge. `require` tightens an Environment that exempts SSO; `exempt` is only accepted where the Environment exempts; `null` inherits.
2431
+ * @enum {string|null}
2432
+ */
2433
+ mfa_after_sso?: "exempt" | "require" | null;
2434
+ /** @description Members must sign in through SSO. Password and email-code logins are refused for the organization's members and for any email whose domain routes to a connection bound to this organization. */
2435
+ require_sso?: boolean;
2436
+ };
2437
+ OrganizationSsoConnectionSummaryDto: {
2438
+ id: string;
2439
+ name: string;
2440
+ /** @enum {string} */
2441
+ type: "saml" | "oidc";
2442
+ status: string;
2443
+ };
2444
+ OrganizationSsoRoleSummaryDto: {
2445
+ id: string;
2446
+ name: string;
2447
+ };
2448
+ OrganizationSsoConnectionResponseDto: {
2449
+ organization_node_id: string;
2450
+ sso_connection_id: string;
2451
+ sso_connection: components["schemas"]["OrganizationSsoConnectionSummaryDto"];
2452
+ /** @description The membership role a login through this connection receives when it joins the organization. */
2453
+ default_role_id: string;
2454
+ default_role: components["schemas"]["OrganizationSsoRoleSummaryDto"];
2455
+ /** Format: date-time */
2456
+ created_at: string;
2457
+ };
2458
+ BindOrganizationSsoConnectionDto: {
2459
+ /** @description An end-user SSO connection already bound to the organization's Environment. */
2460
+ sso_connection_id: string;
2461
+ /** @description The membership role a login through this connection receives when it joins the organization. Must belong to the organization's Environment. */
2462
+ default_role_id: string;
2463
+ };
2464
+ OrganizationMemberIdentityDto: {
2465
+ id: string;
2466
+ email: string;
2467
+ first_name?: string | null;
2468
+ last_name?: string | null;
2469
+ };
2470
+ OrganizationMemberRoleDto: {
2471
+ id: string;
2472
+ name: string;
2473
+ };
2474
+ OrganizationMemberNodeDto: {
2475
+ id: string;
2476
+ name: string;
2477
+ node_type: string;
2478
+ };
2479
+ OrganizationMemberNodeAssignmentDto: {
2480
+ /** @description The assignment id. */
2481
+ id: string;
2482
+ application_node: components["schemas"]["OrganizationMemberNodeDto"];
2483
+ role: components["schemas"]["OrganizationMemberRoleDto"];
2484
+ };
2485
+ OrganizationMemberResponseDto: {
2486
+ /** @description The membership (role assignment) id. */
2487
+ id: string;
2488
+ identity: components["schemas"]["OrganizationMemberIdentityDto"];
2489
+ role: components["schemas"]["OrganizationMemberRoleDto"];
2490
+ /** Format: date-time */
2491
+ effective_from?: string | null;
2492
+ /** Format: date-time */
2493
+ effective_to?: string | null;
2494
+ /**
2495
+ * Format: date-time
2496
+ * @description When the membership was created.
2497
+ */
2498
+ created_at: string;
2499
+ /** @description Assignments the member also holds at nodes beneath the organization. Empty in a flat Environment. */
2500
+ node_assignments: components["schemas"]["OrganizationMemberNodeAssignmentDto"][];
2501
+ };
2502
+ AddOrganizationMemberDto: {
2503
+ /** @description Identity to add. Must already hold an active membership in this Environment; invite by email instead for someone who does not. */
2504
+ identity_id: string;
2505
+ /** @description The single role the member holds in this organization, from the Environment's roles. */
2506
+ role_id: string;
2507
+ };
2508
+ ChangeOrganizationMemberRoleDto: {
2509
+ /** @description The replacement role. A member holds exactly one role per organization, so this updates the existing membership in place. */
2510
+ role_id: string;
2511
+ };
2512
+ CreateOrganizationInviteDto: {
2513
+ /** @description Email to invite. Works for people with no identity in this Environment — one is created when they accept. */
2514
+ email: string;
2515
+ /** @description The role the member will hold in this organization on acceptance. */
2516
+ role_id: string;
2517
+ first_name?: string;
2518
+ last_name?: string;
2519
+ /**
2520
+ * @description Set false to skip the email and deliver the returned accept URL yourself.
2521
+ * @default true
2522
+ */
2523
+ send_email: boolean;
2524
+ };
2152
2525
  RoleResponseDto: {
2153
2526
  id: string;
2154
2527
  application_id: string;
@@ -2252,7 +2625,7 @@ interface components {
2252
2625
  * @description Broad classification from the action catalog (e.g. `auth`, `rbac`). NULL on legacy rows whose action key was unknown at backfill time — those carry the `unknown` value in storage.
2253
2626
  * @enum {string|null}
2254
2627
  */
2255
- category?: "auth" | "identity" | "admin_user" | "tenancy" | "hierarchy" | "rbac" | "authorization" | "api_keys" | "oauth" | "webhooks" | "invites" | "mfa" | "audit" | "billing" | "sso" | "unknown" | null;
2628
+ category?: "auth" | "identity" | "admin_user" | "tenancy" | "hierarchy" | "organization" | "rbac" | "authorization" | "api_keys" | "oauth" | "webhooks" | "invites" | "mfa" | "audit" | "billing" | "sso" | "unknown" | null;
2256
2629
  /**
2257
2630
  * @description `info` for normal-flow events, `notice` for important state changes, `warning` for failures, `critical` for security events.
2258
2631
  * @enum {string}
@@ -2315,7 +2688,7 @@ interface components {
2315
2688
  /** @description Filter by one or more action keys. Repeat the query param (`?action=a&action=b`) or pass a comma-separated string. */
2316
2689
  action?: string[];
2317
2690
  /** @enum {string} */
2318
- category?: "auth" | "identity" | "admin_user" | "tenancy" | "hierarchy" | "rbac" | "authorization" | "api_keys" | "oauth" | "webhooks" | "invites" | "mfa" | "audit" | "billing" | "sso" | "unknown";
2691
+ category?: "auth" | "identity" | "admin_user" | "tenancy" | "hierarchy" | "organization" | "rbac" | "authorization" | "api_keys" | "oauth" | "webhooks" | "invites" | "mfa" | "audit" | "billing" | "sso" | "unknown";
2319
2692
  /** @enum {string} */
2320
2693
  severity?: "info" | "notice" | "warning" | "critical";
2321
2694
  /** @enum {string} */
@@ -2380,7 +2753,7 @@ interface components {
2380
2753
  * @description Broad classification from the action catalog (e.g. `auth`, `rbac`). NULL on legacy rows whose action key was unknown at backfill time — those carry the `unknown` value in storage.
2381
2754
  * @enum {string|null}
2382
2755
  */
2383
- category?: "auth" | "identity" | "admin_user" | "tenancy" | "hierarchy" | "rbac" | "authorization" | "api_keys" | "oauth" | "webhooks" | "invites" | "mfa" | "audit" | "billing" | "sso" | "unknown" | null;
2756
+ category?: "auth" | "identity" | "admin_user" | "tenancy" | "hierarchy" | "organization" | "rbac" | "authorization" | "api_keys" | "oauth" | "webhooks" | "invites" | "mfa" | "audit" | "billing" | "sso" | "unknown" | null;
2384
2757
  /**
2385
2758
  * @description `info` for normal-flow events, `notice` for important state changes, `warning` for failures, `critical` for security events.
2386
2759
  * @enum {string}
@@ -2605,7 +2978,8 @@ interface operations {
2605
2978
  ApiPermissionsController_listPermissions: {
2606
2979
  parameters: {
2607
2980
  query?: {
2608
- source?: string;
2981
+ /** @description Filter by permission origin. */
2982
+ source?: "system" | "custom";
2609
2983
  };
2610
2984
  header?: never;
2611
2985
  path?: never;
@@ -6784,11 +7158,19 @@ interface operations {
6784
7158
  };
6785
7159
  };
6786
7160
  };
6787
- ApiRolesController_listRoles: {
7161
+ ApiOrganizationsController_listOrganizations: {
6788
7162
  parameters: {
6789
7163
  query?: {
6790
- include_inactive?: string;
6791
- type?: string;
7164
+ /** @description Page number (1-based) */
7165
+ page?: number;
7166
+ /** @description Items per page (1-100, default 20) */
7167
+ take?: number;
7168
+ /** @description Search term */
7169
+ q?: string;
7170
+ /** @description Column to sort by. Allowed values depend on the endpoint. */
7171
+ sort_by?: string;
7172
+ /** @description Sort direction */
7173
+ order?: "asc" | "desc";
6792
7174
  };
6793
7175
  header?: never;
6794
7176
  path?: never;
@@ -6796,14 +7178,15 @@ interface operations {
6796
7178
  };
6797
7179
  requestBody?: never;
6798
7180
  responses: {
6799
- /** @description Roles returned */
7181
+ /** @description Paginated list */
6800
7182
  200: {
6801
7183
  headers: {
6802
7184
  [name: string]: unknown;
6803
7185
  };
6804
7186
  content: {
6805
7187
  "application/json": {
6806
- items: components["schemas"]["RoleResponseDto"][];
7188
+ items: components["schemas"]["OrganizationResponseDto"][];
7189
+ pagination: components["schemas"]["PageMetaDto"];
6807
7190
  };
6808
7191
  };
6809
7192
  };
@@ -6820,7 +7203,7 @@ interface operations {
6820
7203
  * "code": null,
6821
7204
  * "message": "Invalid or expired token",
6822
7205
  * "timestamp": "2026-04-20T12:00:00.000Z",
6823
- * "path": "/api/v1/roles",
7206
+ * "path": "/api/v1/organizations",
6824
7207
  * "method": "GET"
6825
7208
  * }
6826
7209
  * }
@@ -6841,7 +7224,7 @@ interface operations {
6841
7224
  * "code": null,
6842
7225
  * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
6843
7226
  * "timestamp": "2026-04-20T12:00:00.000Z",
6844
- * "path": "/api/v1/roles",
7227
+ * "path": "/api/v1/organizations",
6845
7228
  * "method": "GET"
6846
7229
  * }
6847
7230
  * }
@@ -6851,7 +7234,7 @@ interface operations {
6851
7234
  };
6852
7235
  };
6853
7236
  };
6854
- ApiRolesController_createRole: {
7237
+ ApiOrganizationsController_createOrganization: {
6855
7238
  parameters: {
6856
7239
  query?: never;
6857
7240
  header?: never;
@@ -6860,18 +7243,18 @@ interface operations {
6860
7243
  };
6861
7244
  requestBody: {
6862
7245
  content: {
6863
- "application/json": components["schemas"]["CreateRoleDto"];
7246
+ "application/json": components["schemas"]["CreateOrganizationDto"];
6864
7247
  };
6865
7248
  };
6866
7249
  responses: {
6867
- /** @description Role created */
7250
+ /** @description Organization created */
6868
7251
  201: {
6869
7252
  headers: {
6870
7253
  [name: string]: unknown;
6871
7254
  };
6872
7255
  content: {
6873
7256
  "application/json": {
6874
- data: components["schemas"]["RoleResponseDto"];
7257
+ data: components["schemas"]["OrganizationResponseDto"];
6875
7258
  };
6876
7259
  };
6877
7260
  };
@@ -6888,7 +7271,7 @@ interface operations {
6888
7271
  * "code": null,
6889
7272
  * "message": "Invalid or expired token",
6890
7273
  * "timestamp": "2026-04-20T12:00:00.000Z",
6891
- * "path": "/api/v1/roles",
7274
+ * "path": "/api/v1/organizations",
6892
7275
  * "method": "GET"
6893
7276
  * }
6894
7277
  * }
@@ -6909,7 +7292,7 @@ interface operations {
6909
7292
  * "code": null,
6910
7293
  * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
6911
7294
  * "timestamp": "2026-04-20T12:00:00.000Z",
6912
- * "path": "/api/v1/roles",
7295
+ * "path": "/api/v1/organizations",
6913
7296
  * "method": "GET"
6914
7297
  * }
6915
7298
  * }
@@ -6917,7 +7300,7 @@ interface operations {
6917
7300
  "application/json": components["schemas"]["ErrorResponseDto"];
6918
7301
  };
6919
7302
  };
6920
- /** @description Role name already exists */
7303
+ /** @description Organizations are not enabled on this Environment; switch the container on first */
6921
7304
  409: {
6922
7305
  headers: {
6923
7306
  [name: string]: unknown;
@@ -6928,9 +7311,9 @@ interface operations {
6928
7311
  * "error": {
6929
7312
  * "statusCode": 409,
6930
7313
  * "code": null,
6931
- * "message": "Role name already exists",
7314
+ * "message": "Organizations are not enabled on this Environment; switch the container on first",
6932
7315
  * "timestamp": "2026-04-20T12:00:00.000Z",
6933
- * "path": "/api/v1/roles",
7316
+ * "path": "/api/v1/organizations",
6934
7317
  * "method": "POST"
6935
7318
  * }
6936
7319
  * }
@@ -6940,11 +7323,1735 @@ interface operations {
6940
7323
  };
6941
7324
  };
6942
7325
  };
6943
- ApiRolesController_getRole: {
7326
+ ApiOrganizationsController_deleteAllOrganizations: {
6944
7327
  parameters: {
6945
7328
  query?: never;
6946
7329
  header?: never;
6947
- path: {
7330
+ path?: never;
7331
+ cookie?: never;
7332
+ };
7333
+ requestBody?: never;
7334
+ responses: {
7335
+ /** @description Every organization deleted with its memberships, pending invitations, and subtree */
7336
+ 204: {
7337
+ headers: {
7338
+ [name: string]: unknown;
7339
+ };
7340
+ content?: never;
7341
+ };
7342
+ /** @description Invalid or expired token */
7343
+ 401: {
7344
+ headers: {
7345
+ [name: string]: unknown;
7346
+ };
7347
+ content: {
7348
+ /**
7349
+ * @example {
7350
+ * "error": {
7351
+ * "statusCode": 401,
7352
+ * "code": null,
7353
+ * "message": "Invalid or expired token",
7354
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7355
+ * "path": "/api/v1/organizations",
7356
+ * "method": "GET"
7357
+ * }
7358
+ * }
7359
+ */
7360
+ "application/json": components["schemas"]["ErrorResponseDto"];
7361
+ };
7362
+ };
7363
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
7364
+ 403: {
7365
+ headers: {
7366
+ [name: string]: unknown;
7367
+ };
7368
+ content: {
7369
+ /**
7370
+ * @example {
7371
+ * "error": {
7372
+ * "statusCode": 403,
7373
+ * "code": null,
7374
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
7375
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7376
+ * "path": "/api/v1/organizations",
7377
+ * "method": "GET"
7378
+ * }
7379
+ * }
7380
+ */
7381
+ "application/json": components["schemas"]["ErrorResponseDto"];
7382
+ };
7383
+ };
7384
+ };
7385
+ };
7386
+ ApiOrganizationsController_getOrganization: {
7387
+ parameters: {
7388
+ query?: never;
7389
+ header?: never;
7390
+ path: {
7391
+ id: string;
7392
+ };
7393
+ cookie?: never;
7394
+ };
7395
+ requestBody?: never;
7396
+ responses: {
7397
+ /** @description Organization returned */
7398
+ 200: {
7399
+ headers: {
7400
+ [name: string]: unknown;
7401
+ };
7402
+ content: {
7403
+ "application/json": {
7404
+ data: components["schemas"]["OrganizationResponseDto"];
7405
+ };
7406
+ };
7407
+ };
7408
+ /** @description Invalid or expired token */
7409
+ 401: {
7410
+ headers: {
7411
+ [name: string]: unknown;
7412
+ };
7413
+ content: {
7414
+ /**
7415
+ * @example {
7416
+ * "error": {
7417
+ * "statusCode": 401,
7418
+ * "code": null,
7419
+ * "message": "Invalid or expired token",
7420
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7421
+ * "path": "/api/v1/organizations",
7422
+ * "method": "GET"
7423
+ * }
7424
+ * }
7425
+ */
7426
+ "application/json": components["schemas"]["ErrorResponseDto"];
7427
+ };
7428
+ };
7429
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
7430
+ 403: {
7431
+ headers: {
7432
+ [name: string]: unknown;
7433
+ };
7434
+ content: {
7435
+ /**
7436
+ * @example {
7437
+ * "error": {
7438
+ * "statusCode": 403,
7439
+ * "code": null,
7440
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
7441
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7442
+ * "path": "/api/v1/organizations",
7443
+ * "method": "GET"
7444
+ * }
7445
+ * }
7446
+ */
7447
+ "application/json": components["schemas"]["ErrorResponseDto"];
7448
+ };
7449
+ };
7450
+ /** @description Organization not found */
7451
+ 404: {
7452
+ headers: {
7453
+ [name: string]: unknown;
7454
+ };
7455
+ content: {
7456
+ /**
7457
+ * @example {
7458
+ * "error": {
7459
+ * "statusCode": 404,
7460
+ * "code": null,
7461
+ * "message": "Organization not found",
7462
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7463
+ * "path": "/api/v1/organizations/{id}",
7464
+ * "method": "GET"
7465
+ * }
7466
+ * }
7467
+ */
7468
+ "application/json": components["schemas"]["ErrorResponseDto"];
7469
+ };
7470
+ };
7471
+ };
7472
+ };
7473
+ ApiOrganizationsController_deleteOrganization: {
7474
+ parameters: {
7475
+ query?: never;
7476
+ header: {
7477
+ "if-match": string;
7478
+ /** @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. */
7479
+ "If-Match"?: string;
7480
+ };
7481
+ path: {
7482
+ id: string;
7483
+ };
7484
+ cookie?: never;
7485
+ };
7486
+ requestBody?: never;
7487
+ responses: {
7488
+ /** @description Organization deleted */
7489
+ 204: {
7490
+ headers: {
7491
+ [name: string]: unknown;
7492
+ };
7493
+ content?: never;
7494
+ };
7495
+ /** @description Invalid or expired token */
7496
+ 401: {
7497
+ headers: {
7498
+ [name: string]: unknown;
7499
+ };
7500
+ content: {
7501
+ /**
7502
+ * @example {
7503
+ * "error": {
7504
+ * "statusCode": 401,
7505
+ * "code": null,
7506
+ * "message": "Invalid or expired token",
7507
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7508
+ * "path": "/api/v1/organizations",
7509
+ * "method": "GET"
7510
+ * }
7511
+ * }
7512
+ */
7513
+ "application/json": components["schemas"]["ErrorResponseDto"];
7514
+ };
7515
+ };
7516
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
7517
+ 403: {
7518
+ headers: {
7519
+ [name: string]: unknown;
7520
+ };
7521
+ content: {
7522
+ /**
7523
+ * @example {
7524
+ * "error": {
7525
+ * "statusCode": 403,
7526
+ * "code": null,
7527
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
7528
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7529
+ * "path": "/api/v1/organizations",
7530
+ * "method": "GET"
7531
+ * }
7532
+ * }
7533
+ */
7534
+ "application/json": components["schemas"]["ErrorResponseDto"];
7535
+ };
7536
+ };
7537
+ /** @description Organization not found */
7538
+ 404: {
7539
+ headers: {
7540
+ [name: string]: unknown;
7541
+ };
7542
+ content: {
7543
+ /**
7544
+ * @example {
7545
+ * "error": {
7546
+ * "statusCode": 404,
7547
+ * "code": null,
7548
+ * "message": "Organization not found",
7549
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7550
+ * "path": "/api/v1/organizations/{id}",
7551
+ * "method": "DELETE"
7552
+ * }
7553
+ * }
7554
+ */
7555
+ "application/json": components["schemas"]["ErrorResponseDto"];
7556
+ };
7557
+ };
7558
+ /** @description Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry. */
7559
+ 409: {
7560
+ headers: {
7561
+ [name: string]: unknown;
7562
+ };
7563
+ content: {
7564
+ /**
7565
+ * @example {
7566
+ * "error": {
7567
+ * "statusCode": 409,
7568
+ * "code": null,
7569
+ * "message": "Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry.",
7570
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7571
+ * "path": "/api/v1/organizations/{id}",
7572
+ * "method": "DELETE"
7573
+ * }
7574
+ * }
7575
+ */
7576
+ "application/json": components["schemas"]["ErrorResponseDto"];
7577
+ };
7578
+ };
7579
+ };
7580
+ };
7581
+ ApiOrganizationsController_updateOrganization: {
7582
+ parameters: {
7583
+ query?: never;
7584
+ header: {
7585
+ "if-match": string;
7586
+ /** @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. */
7587
+ "If-Match"?: string;
7588
+ };
7589
+ path: {
7590
+ id: string;
7591
+ };
7592
+ cookie?: never;
7593
+ };
7594
+ requestBody: {
7595
+ content: {
7596
+ "application/json": components["schemas"]["UpdateOrganizationDto"];
7597
+ };
7598
+ };
7599
+ responses: {
7600
+ /** @description Organization updated */
7601
+ 200: {
7602
+ headers: {
7603
+ [name: string]: unknown;
7604
+ };
7605
+ content: {
7606
+ "application/json": {
7607
+ data: components["schemas"]["OrganizationResponseDto"];
7608
+ };
7609
+ };
7610
+ };
7611
+ /** @description Invalid or expired token */
7612
+ 401: {
7613
+ headers: {
7614
+ [name: string]: unknown;
7615
+ };
7616
+ content: {
7617
+ /**
7618
+ * @example {
7619
+ * "error": {
7620
+ * "statusCode": 401,
7621
+ * "code": null,
7622
+ * "message": "Invalid or expired token",
7623
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7624
+ * "path": "/api/v1/organizations",
7625
+ * "method": "GET"
7626
+ * }
7627
+ * }
7628
+ */
7629
+ "application/json": components["schemas"]["ErrorResponseDto"];
7630
+ };
7631
+ };
7632
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
7633
+ 403: {
7634
+ headers: {
7635
+ [name: string]: unknown;
7636
+ };
7637
+ content: {
7638
+ /**
7639
+ * @example {
7640
+ * "error": {
7641
+ * "statusCode": 403,
7642
+ * "code": null,
7643
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
7644
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7645
+ * "path": "/api/v1/organizations",
7646
+ * "method": "GET"
7647
+ * }
7648
+ * }
7649
+ */
7650
+ "application/json": components["schemas"]["ErrorResponseDto"];
7651
+ };
7652
+ };
7653
+ /** @description Organization not found */
7654
+ 404: {
7655
+ headers: {
7656
+ [name: string]: unknown;
7657
+ };
7658
+ content: {
7659
+ /**
7660
+ * @example {
7661
+ * "error": {
7662
+ * "statusCode": 404,
7663
+ * "code": null,
7664
+ * "message": "Organization not found",
7665
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7666
+ * "path": "/api/v1/organizations/{id}",
7667
+ * "method": "PATCH"
7668
+ * }
7669
+ * }
7670
+ */
7671
+ "application/json": components["schemas"]["ErrorResponseDto"];
7672
+ };
7673
+ };
7674
+ /** @description Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry. */
7675
+ 409: {
7676
+ headers: {
7677
+ [name: string]: unknown;
7678
+ };
7679
+ content: {
7680
+ /**
7681
+ * @example {
7682
+ * "error": {
7683
+ * "statusCode": 409,
7684
+ * "code": null,
7685
+ * "message": "Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry.",
7686
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7687
+ * "path": "/api/v1/organizations/{id}",
7688
+ * "method": "PATCH"
7689
+ * }
7690
+ * }
7691
+ */
7692
+ "application/json": components["schemas"]["ErrorResponseDto"];
7693
+ };
7694
+ };
7695
+ };
7696
+ };
7697
+ ApiOrganizationsController_getPolicy: {
7698
+ parameters: {
7699
+ query?: never;
7700
+ header?: never;
7701
+ path: {
7702
+ id: string;
7703
+ };
7704
+ cookie?: never;
7705
+ };
7706
+ requestBody?: never;
7707
+ responses: {
7708
+ /** @description Policy returned */
7709
+ 200: {
7710
+ headers: {
7711
+ [name: string]: unknown;
7712
+ };
7713
+ content: {
7714
+ "application/json": {
7715
+ data: components["schemas"]["OrganizationPolicyResponseDto"];
7716
+ };
7717
+ };
7718
+ };
7719
+ /** @description Invalid or expired token */
7720
+ 401: {
7721
+ headers: {
7722
+ [name: string]: unknown;
7723
+ };
7724
+ content: {
7725
+ /**
7726
+ * @example {
7727
+ * "error": {
7728
+ * "statusCode": 401,
7729
+ * "code": null,
7730
+ * "message": "Invalid or expired token",
7731
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7732
+ * "path": "/api/v1/organizations",
7733
+ * "method": "GET"
7734
+ * }
7735
+ * }
7736
+ */
7737
+ "application/json": components["schemas"]["ErrorResponseDto"];
7738
+ };
7739
+ };
7740
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
7741
+ 403: {
7742
+ headers: {
7743
+ [name: string]: unknown;
7744
+ };
7745
+ content: {
7746
+ /**
7747
+ * @example {
7748
+ * "error": {
7749
+ * "statusCode": 403,
7750
+ * "code": null,
7751
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
7752
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7753
+ * "path": "/api/v1/organizations",
7754
+ * "method": "GET"
7755
+ * }
7756
+ * }
7757
+ */
7758
+ "application/json": components["schemas"]["ErrorResponseDto"];
7759
+ };
7760
+ };
7761
+ /** @description Organization not found */
7762
+ 404: {
7763
+ headers: {
7764
+ [name: string]: unknown;
7765
+ };
7766
+ content: {
7767
+ /**
7768
+ * @example {
7769
+ * "error": {
7770
+ * "statusCode": 404,
7771
+ * "code": null,
7772
+ * "message": "Organization not found",
7773
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7774
+ * "path": "/api/v1/organizations/{id}/policy",
7775
+ * "method": "GET"
7776
+ * }
7777
+ * }
7778
+ */
7779
+ "application/json": components["schemas"]["ErrorResponseDto"];
7780
+ };
7781
+ };
7782
+ };
7783
+ };
7784
+ ApiOrganizationsController_updatePolicy: {
7785
+ parameters: {
7786
+ query?: never;
7787
+ header: {
7788
+ "if-match": string;
7789
+ /** @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. */
7790
+ "If-Match"?: string;
7791
+ };
7792
+ path: {
7793
+ id: string;
7794
+ };
7795
+ cookie?: never;
7796
+ };
7797
+ requestBody: {
7798
+ content: {
7799
+ "application/json": components["schemas"]["UpdateOrganizationPolicyDto"];
7800
+ };
7801
+ };
7802
+ responses: {
7803
+ /** @description Policy updated */
7804
+ 200: {
7805
+ headers: {
7806
+ [name: string]: unknown;
7807
+ };
7808
+ content: {
7809
+ "application/json": {
7810
+ data: components["schemas"]["OrganizationPolicyResponseDto"];
7811
+ };
7812
+ };
7813
+ };
7814
+ /** @description The policy would loosen the Environment's authentication settings */
7815
+ 400: {
7816
+ headers: {
7817
+ [name: string]: unknown;
7818
+ };
7819
+ content: {
7820
+ /**
7821
+ * @example {
7822
+ * "error": {
7823
+ * "statusCode": 400,
7824
+ * "code": null,
7825
+ * "message": "The policy would loosen the Environment's authentication settings",
7826
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7827
+ * "path": "/api/v1/organizations/{id}/policy",
7828
+ * "method": "PATCH"
7829
+ * }
7830
+ * }
7831
+ */
7832
+ "application/json": components["schemas"]["ErrorResponseDto"];
7833
+ };
7834
+ };
7835
+ /** @description Invalid or expired token */
7836
+ 401: {
7837
+ headers: {
7838
+ [name: string]: unknown;
7839
+ };
7840
+ content: {
7841
+ /**
7842
+ * @example {
7843
+ * "error": {
7844
+ * "statusCode": 401,
7845
+ * "code": null,
7846
+ * "message": "Invalid or expired token",
7847
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7848
+ * "path": "/api/v1/organizations",
7849
+ * "method": "GET"
7850
+ * }
7851
+ * }
7852
+ */
7853
+ "application/json": components["schemas"]["ErrorResponseDto"];
7854
+ };
7855
+ };
7856
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
7857
+ 403: {
7858
+ headers: {
7859
+ [name: string]: unknown;
7860
+ };
7861
+ content: {
7862
+ /**
7863
+ * @example {
7864
+ * "error": {
7865
+ * "statusCode": 403,
7866
+ * "code": null,
7867
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
7868
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7869
+ * "path": "/api/v1/organizations",
7870
+ * "method": "GET"
7871
+ * }
7872
+ * }
7873
+ */
7874
+ "application/json": components["schemas"]["ErrorResponseDto"];
7875
+ };
7876
+ };
7877
+ /** @description Organization not found */
7878
+ 404: {
7879
+ headers: {
7880
+ [name: string]: unknown;
7881
+ };
7882
+ content: {
7883
+ /**
7884
+ * @example {
7885
+ * "error": {
7886
+ * "statusCode": 404,
7887
+ * "code": null,
7888
+ * "message": "Organization not found",
7889
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7890
+ * "path": "/api/v1/organizations/{id}/policy",
7891
+ * "method": "PATCH"
7892
+ * }
7893
+ * }
7894
+ */
7895
+ "application/json": components["schemas"]["ErrorResponseDto"];
7896
+ };
7897
+ };
7898
+ /** @description Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry. */
7899
+ 409: {
7900
+ headers: {
7901
+ [name: string]: unknown;
7902
+ };
7903
+ content: {
7904
+ /**
7905
+ * @example {
7906
+ * "error": {
7907
+ * "statusCode": 409,
7908
+ * "code": null,
7909
+ * "message": "Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry.",
7910
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7911
+ * "path": "/api/v1/organizations/{id}/policy",
7912
+ * "method": "PATCH"
7913
+ * }
7914
+ * }
7915
+ */
7916
+ "application/json": components["schemas"]["ErrorResponseDto"];
7917
+ };
7918
+ };
7919
+ };
7920
+ };
7921
+ ApiOrganizationsController_listSsoConnections: {
7922
+ parameters: {
7923
+ query?: never;
7924
+ header?: never;
7925
+ path: {
7926
+ id: string;
7927
+ };
7928
+ cookie?: never;
7929
+ };
7930
+ requestBody?: never;
7931
+ responses: {
7932
+ /** @description Bindings returned */
7933
+ 200: {
7934
+ headers: {
7935
+ [name: string]: unknown;
7936
+ };
7937
+ content: {
7938
+ "application/json": {
7939
+ items: components["schemas"]["OrganizationSsoConnectionResponseDto"][];
7940
+ };
7941
+ };
7942
+ };
7943
+ /** @description Invalid or expired token */
7944
+ 401: {
7945
+ headers: {
7946
+ [name: string]: unknown;
7947
+ };
7948
+ content: {
7949
+ /**
7950
+ * @example {
7951
+ * "error": {
7952
+ * "statusCode": 401,
7953
+ * "code": null,
7954
+ * "message": "Invalid or expired token",
7955
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7956
+ * "path": "/api/v1/organizations",
7957
+ * "method": "GET"
7958
+ * }
7959
+ * }
7960
+ */
7961
+ "application/json": components["schemas"]["ErrorResponseDto"];
7962
+ };
7963
+ };
7964
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
7965
+ 403: {
7966
+ headers: {
7967
+ [name: string]: unknown;
7968
+ };
7969
+ content: {
7970
+ /**
7971
+ * @example {
7972
+ * "error": {
7973
+ * "statusCode": 403,
7974
+ * "code": null,
7975
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
7976
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7977
+ * "path": "/api/v1/organizations",
7978
+ * "method": "GET"
7979
+ * }
7980
+ * }
7981
+ */
7982
+ "application/json": components["schemas"]["ErrorResponseDto"];
7983
+ };
7984
+ };
7985
+ /** @description Organization not found */
7986
+ 404: {
7987
+ headers: {
7988
+ [name: string]: unknown;
7989
+ };
7990
+ content: {
7991
+ /**
7992
+ * @example {
7993
+ * "error": {
7994
+ * "statusCode": 404,
7995
+ * "code": null,
7996
+ * "message": "Organization not found",
7997
+ * "timestamp": "2026-04-20T12:00:00.000Z",
7998
+ * "path": "/api/v1/organizations/{id}/sso-connections",
7999
+ * "method": "GET"
8000
+ * }
8001
+ * }
8002
+ */
8003
+ "application/json": components["schemas"]["ErrorResponseDto"];
8004
+ };
8005
+ };
8006
+ };
8007
+ };
8008
+ ApiOrganizationsController_bindSsoConnection: {
8009
+ parameters: {
8010
+ query?: never;
8011
+ header?: never;
8012
+ path: {
8013
+ id: string;
8014
+ };
8015
+ cookie?: never;
8016
+ };
8017
+ requestBody: {
8018
+ content: {
8019
+ "application/json": components["schemas"]["BindOrganizationSsoConnectionDto"];
8020
+ };
8021
+ };
8022
+ responses: {
8023
+ /** @description Connection bound */
8024
+ 201: {
8025
+ headers: {
8026
+ [name: string]: unknown;
8027
+ };
8028
+ content: {
8029
+ "application/json": {
8030
+ data: components["schemas"]["OrganizationSsoConnectionResponseDto"];
8031
+ };
8032
+ };
8033
+ };
8034
+ /** @description The connection is not an end-user connection bound to the organization's Environment, or the role is not in that Environment */
8035
+ 400: {
8036
+ headers: {
8037
+ [name: string]: unknown;
8038
+ };
8039
+ content: {
8040
+ /**
8041
+ * @example {
8042
+ * "error": {
8043
+ * "statusCode": 400,
8044
+ * "code": null,
8045
+ * "message": "The connection is not an end-user connection bound to the organization's Environment, or the role is not in that Environment",
8046
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8047
+ * "path": "/api/v1/organizations/{id}/sso-connections",
8048
+ * "method": "POST"
8049
+ * }
8050
+ * }
8051
+ */
8052
+ "application/json": components["schemas"]["ErrorResponseDto"];
8053
+ };
8054
+ };
8055
+ /** @description Invalid or expired token */
8056
+ 401: {
8057
+ headers: {
8058
+ [name: string]: unknown;
8059
+ };
8060
+ content: {
8061
+ /**
8062
+ * @example {
8063
+ * "error": {
8064
+ * "statusCode": 401,
8065
+ * "code": null,
8066
+ * "message": "Invalid or expired token",
8067
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8068
+ * "path": "/api/v1/organizations",
8069
+ * "method": "GET"
8070
+ * }
8071
+ * }
8072
+ */
8073
+ "application/json": components["schemas"]["ErrorResponseDto"];
8074
+ };
8075
+ };
8076
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8077
+ 403: {
8078
+ headers: {
8079
+ [name: string]: unknown;
8080
+ };
8081
+ content: {
8082
+ /**
8083
+ * @example {
8084
+ * "error": {
8085
+ * "statusCode": 403,
8086
+ * "code": null,
8087
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8088
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8089
+ * "path": "/api/v1/organizations",
8090
+ * "method": "GET"
8091
+ * }
8092
+ * }
8093
+ */
8094
+ "application/json": components["schemas"]["ErrorResponseDto"];
8095
+ };
8096
+ };
8097
+ /** @description Organization not found */
8098
+ 404: {
8099
+ headers: {
8100
+ [name: string]: unknown;
8101
+ };
8102
+ content: {
8103
+ /**
8104
+ * @example {
8105
+ * "error": {
8106
+ * "statusCode": 404,
8107
+ * "code": null,
8108
+ * "message": "Organization not found",
8109
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8110
+ * "path": "/api/v1/organizations/{id}/sso-connections",
8111
+ * "method": "POST"
8112
+ * }
8113
+ * }
8114
+ */
8115
+ "application/json": components["schemas"]["ErrorResponseDto"];
8116
+ };
8117
+ };
8118
+ /** @description The connection is already bound to an organization in this Environment */
8119
+ 409: {
8120
+ headers: {
8121
+ [name: string]: unknown;
8122
+ };
8123
+ content: {
8124
+ /**
8125
+ * @example {
8126
+ * "error": {
8127
+ * "statusCode": 409,
8128
+ * "code": null,
8129
+ * "message": "The connection is already bound to an organization in this Environment",
8130
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8131
+ * "path": "/api/v1/organizations/{id}/sso-connections",
8132
+ * "method": "POST"
8133
+ * }
8134
+ * }
8135
+ */
8136
+ "application/json": components["schemas"]["ErrorResponseDto"];
8137
+ };
8138
+ };
8139
+ };
8140
+ };
8141
+ ApiOrganizationsController_unbindSsoConnection: {
8142
+ parameters: {
8143
+ query?: never;
8144
+ header?: never;
8145
+ path: {
8146
+ id: string;
8147
+ connectionId: string;
8148
+ };
8149
+ cookie?: never;
8150
+ };
8151
+ requestBody?: never;
8152
+ responses: {
8153
+ /** @description Connection unbound */
8154
+ 204: {
8155
+ headers: {
8156
+ [name: string]: unknown;
8157
+ };
8158
+ content?: never;
8159
+ };
8160
+ /** @description Invalid or expired token */
8161
+ 401: {
8162
+ headers: {
8163
+ [name: string]: unknown;
8164
+ };
8165
+ content: {
8166
+ /**
8167
+ * @example {
8168
+ * "error": {
8169
+ * "statusCode": 401,
8170
+ * "code": null,
8171
+ * "message": "Invalid or expired token",
8172
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8173
+ * "path": "/api/v1/organizations",
8174
+ * "method": "GET"
8175
+ * }
8176
+ * }
8177
+ */
8178
+ "application/json": components["schemas"]["ErrorResponseDto"];
8179
+ };
8180
+ };
8181
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8182
+ 403: {
8183
+ headers: {
8184
+ [name: string]: unknown;
8185
+ };
8186
+ content: {
8187
+ /**
8188
+ * @example {
8189
+ * "error": {
8190
+ * "statusCode": 403,
8191
+ * "code": null,
8192
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8193
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8194
+ * "path": "/api/v1/organizations",
8195
+ * "method": "GET"
8196
+ * }
8197
+ * }
8198
+ */
8199
+ "application/json": components["schemas"]["ErrorResponseDto"];
8200
+ };
8201
+ };
8202
+ /** @description This SSO connection is not bound to the organization */
8203
+ 404: {
8204
+ headers: {
8205
+ [name: string]: unknown;
8206
+ };
8207
+ content: {
8208
+ /**
8209
+ * @example {
8210
+ * "error": {
8211
+ * "statusCode": 404,
8212
+ * "code": null,
8213
+ * "message": "This SSO connection is not bound to the organization",
8214
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8215
+ * "path": "/api/v1/organizations/{id}/sso-connections/{connectionId}",
8216
+ * "method": "DELETE"
8217
+ * }
8218
+ * }
8219
+ */
8220
+ "application/json": components["schemas"]["ErrorResponseDto"];
8221
+ };
8222
+ };
8223
+ };
8224
+ };
8225
+ ApiOrganizationsController_listMembers: {
8226
+ parameters: {
8227
+ query?: {
8228
+ /** @description Page number (1-based) */
8229
+ page?: number;
8230
+ /** @description Items per page (1-100, default 20) */
8231
+ take?: number;
8232
+ /** @description Search term */
8233
+ q?: string;
8234
+ /** @description Column to sort by. Allowed values depend on the endpoint. */
8235
+ sort_by?: string;
8236
+ /** @description Sort direction */
8237
+ order?: "asc" | "desc";
8238
+ /** @description Only members holding this role */
8239
+ role_id?: string;
8240
+ /** @description Filter by the membership's effective window: active now, scheduled to start, or already expired */
8241
+ status?: "active" | "scheduled" | "expired";
8242
+ };
8243
+ header?: never;
8244
+ path: {
8245
+ id: string;
8246
+ };
8247
+ cookie?: never;
8248
+ };
8249
+ requestBody?: never;
8250
+ responses: {
8251
+ /** @description Paginated list */
8252
+ 200: {
8253
+ headers: {
8254
+ [name: string]: unknown;
8255
+ };
8256
+ content: {
8257
+ "application/json": {
8258
+ items: components["schemas"]["OrganizationMemberResponseDto"][];
8259
+ pagination: components["schemas"]["PageMetaDto"];
8260
+ };
8261
+ };
8262
+ };
8263
+ /** @description Invalid or expired token */
8264
+ 401: {
8265
+ headers: {
8266
+ [name: string]: unknown;
8267
+ };
8268
+ content: {
8269
+ /**
8270
+ * @example {
8271
+ * "error": {
8272
+ * "statusCode": 401,
8273
+ * "code": null,
8274
+ * "message": "Invalid or expired token",
8275
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8276
+ * "path": "/api/v1/organizations",
8277
+ * "method": "GET"
8278
+ * }
8279
+ * }
8280
+ */
8281
+ "application/json": components["schemas"]["ErrorResponseDto"];
8282
+ };
8283
+ };
8284
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8285
+ 403: {
8286
+ headers: {
8287
+ [name: string]: unknown;
8288
+ };
8289
+ content: {
8290
+ /**
8291
+ * @example {
8292
+ * "error": {
8293
+ * "statusCode": 403,
8294
+ * "code": null,
8295
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8296
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8297
+ * "path": "/api/v1/organizations",
8298
+ * "method": "GET"
8299
+ * }
8300
+ * }
8301
+ */
8302
+ "application/json": components["schemas"]["ErrorResponseDto"];
8303
+ };
8304
+ };
8305
+ /** @description Organization not found */
8306
+ 404: {
8307
+ headers: {
8308
+ [name: string]: unknown;
8309
+ };
8310
+ content: {
8311
+ /**
8312
+ * @example {
8313
+ * "error": {
8314
+ * "statusCode": 404,
8315
+ * "code": null,
8316
+ * "message": "Organization not found",
8317
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8318
+ * "path": "/api/v1/organizations/{id}/members",
8319
+ * "method": "GET"
8320
+ * }
8321
+ * }
8322
+ */
8323
+ "application/json": components["schemas"]["ErrorResponseDto"];
8324
+ };
8325
+ };
8326
+ };
8327
+ };
8328
+ ApiOrganizationsController_addMember: {
8329
+ parameters: {
8330
+ query?: never;
8331
+ header?: never;
8332
+ path: {
8333
+ id: string;
8334
+ };
8335
+ cookie?: never;
8336
+ };
8337
+ requestBody: {
8338
+ content: {
8339
+ "application/json": components["schemas"]["AddOrganizationMemberDto"];
8340
+ };
8341
+ };
8342
+ responses: {
8343
+ /** @description Member added */
8344
+ 201: {
8345
+ headers: {
8346
+ [name: string]: unknown;
8347
+ };
8348
+ content: {
8349
+ "application/json": {
8350
+ data: components["schemas"]["OrganizationMemberResponseDto"];
8351
+ };
8352
+ };
8353
+ };
8354
+ /** @description Invalid or expired token */
8355
+ 401: {
8356
+ headers: {
8357
+ [name: string]: unknown;
8358
+ };
8359
+ content: {
8360
+ /**
8361
+ * @example {
8362
+ * "error": {
8363
+ * "statusCode": 401,
8364
+ * "code": null,
8365
+ * "message": "Invalid or expired token",
8366
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8367
+ * "path": "/api/v1/organizations",
8368
+ * "method": "GET"
8369
+ * }
8370
+ * }
8371
+ */
8372
+ "application/json": components["schemas"]["ErrorResponseDto"];
8373
+ };
8374
+ };
8375
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8376
+ 403: {
8377
+ headers: {
8378
+ [name: string]: unknown;
8379
+ };
8380
+ content: {
8381
+ /**
8382
+ * @example {
8383
+ * "error": {
8384
+ * "statusCode": 403,
8385
+ * "code": null,
8386
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8387
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8388
+ * "path": "/api/v1/organizations",
8389
+ * "method": "GET"
8390
+ * }
8391
+ * }
8392
+ */
8393
+ "application/json": components["schemas"]["ErrorResponseDto"];
8394
+ };
8395
+ };
8396
+ /** @description Organization not found */
8397
+ 404: {
8398
+ headers: {
8399
+ [name: string]: unknown;
8400
+ };
8401
+ content: {
8402
+ /**
8403
+ * @example {
8404
+ * "error": {
8405
+ * "statusCode": 404,
8406
+ * "code": null,
8407
+ * "message": "Organization not found",
8408
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8409
+ * "path": "/api/v1/organizations/{id}/members",
8410
+ * "method": "POST"
8411
+ * }
8412
+ * }
8413
+ */
8414
+ "application/json": components["schemas"]["ErrorResponseDto"];
8415
+ };
8416
+ };
8417
+ /** @description The identity is already a member of this organization */
8418
+ 409: {
8419
+ headers: {
8420
+ [name: string]: unknown;
8421
+ };
8422
+ content: {
8423
+ /**
8424
+ * @example {
8425
+ * "error": {
8426
+ * "statusCode": 409,
8427
+ * "code": null,
8428
+ * "message": "The identity is already a member of this organization",
8429
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8430
+ * "path": "/api/v1/organizations/{id}/members",
8431
+ * "method": "POST"
8432
+ * }
8433
+ * }
8434
+ */
8435
+ "application/json": components["schemas"]["ErrorResponseDto"];
8436
+ };
8437
+ };
8438
+ };
8439
+ };
8440
+ ApiOrganizationsController_removeMember: {
8441
+ parameters: {
8442
+ query?: never;
8443
+ header?: never;
8444
+ path: {
8445
+ id: string;
8446
+ identityId: string;
8447
+ };
8448
+ cookie?: never;
8449
+ };
8450
+ requestBody?: never;
8451
+ responses: {
8452
+ /** @description Member removed */
8453
+ 204: {
8454
+ headers: {
8455
+ [name: string]: unknown;
8456
+ };
8457
+ content?: never;
8458
+ };
8459
+ /** @description Invalid or expired token */
8460
+ 401: {
8461
+ headers: {
8462
+ [name: string]: unknown;
8463
+ };
8464
+ content: {
8465
+ /**
8466
+ * @example {
8467
+ * "error": {
8468
+ * "statusCode": 401,
8469
+ * "code": null,
8470
+ * "message": "Invalid or expired token",
8471
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8472
+ * "path": "/api/v1/organizations",
8473
+ * "method": "GET"
8474
+ * }
8475
+ * }
8476
+ */
8477
+ "application/json": components["schemas"]["ErrorResponseDto"];
8478
+ };
8479
+ };
8480
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8481
+ 403: {
8482
+ headers: {
8483
+ [name: string]: unknown;
8484
+ };
8485
+ content: {
8486
+ /**
8487
+ * @example {
8488
+ * "error": {
8489
+ * "statusCode": 403,
8490
+ * "code": null,
8491
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8492
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8493
+ * "path": "/api/v1/organizations",
8494
+ * "method": "GET"
8495
+ * }
8496
+ * }
8497
+ */
8498
+ "application/json": components["schemas"]["ErrorResponseDto"];
8499
+ };
8500
+ };
8501
+ /** @description The identity is not a member of this organization */
8502
+ 404: {
8503
+ headers: {
8504
+ [name: string]: unknown;
8505
+ };
8506
+ content: {
8507
+ /**
8508
+ * @example {
8509
+ * "error": {
8510
+ * "statusCode": 404,
8511
+ * "code": null,
8512
+ * "message": "The identity is not a member of this organization",
8513
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8514
+ * "path": "/api/v1/organizations/{id}/members/{identityId}",
8515
+ * "method": "DELETE"
8516
+ * }
8517
+ * }
8518
+ */
8519
+ "application/json": components["schemas"]["ErrorResponseDto"];
8520
+ };
8521
+ };
8522
+ };
8523
+ };
8524
+ ApiOrganizationsController_changeMemberRole: {
8525
+ parameters: {
8526
+ query?: never;
8527
+ header?: never;
8528
+ path: {
8529
+ id: string;
8530
+ identityId: string;
8531
+ };
8532
+ cookie?: never;
8533
+ };
8534
+ requestBody: {
8535
+ content: {
8536
+ "application/json": components["schemas"]["ChangeOrganizationMemberRoleDto"];
8537
+ };
8538
+ };
8539
+ responses: {
8540
+ /** @description Member role changed */
8541
+ 200: {
8542
+ headers: {
8543
+ [name: string]: unknown;
8544
+ };
8545
+ content: {
8546
+ "application/json": {
8547
+ data: components["schemas"]["OrganizationMemberResponseDto"];
8548
+ };
8549
+ };
8550
+ };
8551
+ /** @description Invalid or expired token */
8552
+ 401: {
8553
+ headers: {
8554
+ [name: string]: unknown;
8555
+ };
8556
+ content: {
8557
+ /**
8558
+ * @example {
8559
+ * "error": {
8560
+ * "statusCode": 401,
8561
+ * "code": null,
8562
+ * "message": "Invalid or expired token",
8563
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8564
+ * "path": "/api/v1/organizations",
8565
+ * "method": "GET"
8566
+ * }
8567
+ * }
8568
+ */
8569
+ "application/json": components["schemas"]["ErrorResponseDto"];
8570
+ };
8571
+ };
8572
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8573
+ 403: {
8574
+ headers: {
8575
+ [name: string]: unknown;
8576
+ };
8577
+ content: {
8578
+ /**
8579
+ * @example {
8580
+ * "error": {
8581
+ * "statusCode": 403,
8582
+ * "code": null,
8583
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8584
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8585
+ * "path": "/api/v1/organizations",
8586
+ * "method": "GET"
8587
+ * }
8588
+ * }
8589
+ */
8590
+ "application/json": components["schemas"]["ErrorResponseDto"];
8591
+ };
8592
+ };
8593
+ /** @description The identity is not a member of this organization */
8594
+ 404: {
8595
+ headers: {
8596
+ [name: string]: unknown;
8597
+ };
8598
+ content: {
8599
+ /**
8600
+ * @example {
8601
+ * "error": {
8602
+ * "statusCode": 404,
8603
+ * "code": null,
8604
+ * "message": "The identity is not a member of this organization",
8605
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8606
+ * "path": "/api/v1/organizations/{id}/members/{identityId}",
8607
+ * "method": "PATCH"
8608
+ * }
8609
+ * }
8610
+ */
8611
+ "application/json": components["schemas"]["ErrorResponseDto"];
8612
+ };
8613
+ };
8614
+ };
8615
+ };
8616
+ ApiOrganizationsController_listInvites: {
8617
+ parameters: {
8618
+ query?: {
8619
+ /** @description Page number (1-based) */
8620
+ page?: number;
8621
+ /** @description Items per page (1-100, default 20) */
8622
+ take?: number;
8623
+ /** @description Search term */
8624
+ q?: string;
8625
+ /** @description Column to sort by. Allowed values depend on the endpoint. */
8626
+ sort_by?: string;
8627
+ /** @description Sort direction */
8628
+ order?: "asc" | "desc";
8629
+ /** @description Filter by invitation status */
8630
+ status?: "pending" | "accepted" | "revoked" | "expired";
8631
+ };
8632
+ header?: never;
8633
+ path: {
8634
+ id: string;
8635
+ };
8636
+ cookie?: never;
8637
+ };
8638
+ requestBody?: never;
8639
+ responses: {
8640
+ /** @description Paginated list */
8641
+ 200: {
8642
+ headers: {
8643
+ [name: string]: unknown;
8644
+ };
8645
+ content: {
8646
+ "application/json": {
8647
+ items: components["schemas"]["IdentityInviteResponseDto"][];
8648
+ pagination: components["schemas"]["PageMetaDto"];
8649
+ };
8650
+ };
8651
+ };
8652
+ /** @description Invalid or expired token */
8653
+ 401: {
8654
+ headers: {
8655
+ [name: string]: unknown;
8656
+ };
8657
+ content: {
8658
+ /**
8659
+ * @example {
8660
+ * "error": {
8661
+ * "statusCode": 401,
8662
+ * "code": null,
8663
+ * "message": "Invalid or expired token",
8664
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8665
+ * "path": "/api/v1/organizations",
8666
+ * "method": "GET"
8667
+ * }
8668
+ * }
8669
+ */
8670
+ "application/json": components["schemas"]["ErrorResponseDto"];
8671
+ };
8672
+ };
8673
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8674
+ 403: {
8675
+ headers: {
8676
+ [name: string]: unknown;
8677
+ };
8678
+ content: {
8679
+ /**
8680
+ * @example {
8681
+ * "error": {
8682
+ * "statusCode": 403,
8683
+ * "code": null,
8684
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8685
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8686
+ * "path": "/api/v1/organizations",
8687
+ * "method": "GET"
8688
+ * }
8689
+ * }
8690
+ */
8691
+ "application/json": components["schemas"]["ErrorResponseDto"];
8692
+ };
8693
+ };
8694
+ /** @description Organization not found */
8695
+ 404: {
8696
+ headers: {
8697
+ [name: string]: unknown;
8698
+ };
8699
+ content: {
8700
+ /**
8701
+ * @example {
8702
+ * "error": {
8703
+ * "statusCode": 404,
8704
+ * "code": null,
8705
+ * "message": "Organization not found",
8706
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8707
+ * "path": "/api/v1/organizations/{id}/invites",
8708
+ * "method": "GET"
8709
+ * }
8710
+ * }
8711
+ */
8712
+ "application/json": components["schemas"]["ErrorResponseDto"];
8713
+ };
8714
+ };
8715
+ };
8716
+ };
8717
+ ApiOrganizationsController_createInvite: {
8718
+ parameters: {
8719
+ query?: never;
8720
+ header?: never;
8721
+ path: {
8722
+ id: string;
8723
+ };
8724
+ cookie?: never;
8725
+ };
8726
+ requestBody: {
8727
+ content: {
8728
+ "application/json": components["schemas"]["CreateOrganizationInviteDto"];
8729
+ };
8730
+ };
8731
+ responses: {
8732
+ /** @description Invitation created */
8733
+ 201: {
8734
+ headers: {
8735
+ [name: string]: unknown;
8736
+ };
8737
+ content: {
8738
+ "application/json": {
8739
+ data: components["schemas"]["ApiIdentityInviteResponseDto"];
8740
+ };
8741
+ };
8742
+ };
8743
+ /** @description Invalid or expired token */
8744
+ 401: {
8745
+ headers: {
8746
+ [name: string]: unknown;
8747
+ };
8748
+ content: {
8749
+ /**
8750
+ * @example {
8751
+ * "error": {
8752
+ * "statusCode": 401,
8753
+ * "code": null,
8754
+ * "message": "Invalid or expired token",
8755
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8756
+ * "path": "/api/v1/organizations",
8757
+ * "method": "GET"
8758
+ * }
8759
+ * }
8760
+ */
8761
+ "application/json": components["schemas"]["ErrorResponseDto"];
8762
+ };
8763
+ };
8764
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8765
+ 403: {
8766
+ headers: {
8767
+ [name: string]: unknown;
8768
+ };
8769
+ content: {
8770
+ /**
8771
+ * @example {
8772
+ * "error": {
8773
+ * "statusCode": 403,
8774
+ * "code": null,
8775
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8776
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8777
+ * "path": "/api/v1/organizations",
8778
+ * "method": "GET"
8779
+ * }
8780
+ * }
8781
+ */
8782
+ "application/json": components["schemas"]["ErrorResponseDto"];
8783
+ };
8784
+ };
8785
+ /** @description Organization not found */
8786
+ 404: {
8787
+ headers: {
8788
+ [name: string]: unknown;
8789
+ };
8790
+ content: {
8791
+ /**
8792
+ * @example {
8793
+ * "error": {
8794
+ * "statusCode": 404,
8795
+ * "code": null,
8796
+ * "message": "Organization not found",
8797
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8798
+ * "path": "/api/v1/organizations/{id}/invites",
8799
+ * "method": "POST"
8800
+ * }
8801
+ * }
8802
+ */
8803
+ "application/json": components["schemas"]["ErrorResponseDto"];
8804
+ };
8805
+ };
8806
+ };
8807
+ };
8808
+ ApiOrganizationsController_revokeInvite: {
8809
+ parameters: {
8810
+ query?: never;
8811
+ header?: never;
8812
+ path: {
8813
+ id: string;
8814
+ inviteId: string;
8815
+ };
8816
+ cookie?: never;
8817
+ };
8818
+ requestBody?: never;
8819
+ responses: {
8820
+ /** @description Invitation revoked */
8821
+ 204: {
8822
+ headers: {
8823
+ [name: string]: unknown;
8824
+ };
8825
+ content?: never;
8826
+ };
8827
+ /** @description Invalid or expired token */
8828
+ 401: {
8829
+ headers: {
8830
+ [name: string]: unknown;
8831
+ };
8832
+ content: {
8833
+ /**
8834
+ * @example {
8835
+ * "error": {
8836
+ * "statusCode": 401,
8837
+ * "code": null,
8838
+ * "message": "Invalid or expired token",
8839
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8840
+ * "path": "/api/v1/organizations",
8841
+ * "method": "GET"
8842
+ * }
8843
+ * }
8844
+ */
8845
+ "application/json": components["schemas"]["ErrorResponseDto"];
8846
+ };
8847
+ };
8848
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8849
+ 403: {
8850
+ headers: {
8851
+ [name: string]: unknown;
8852
+ };
8853
+ content: {
8854
+ /**
8855
+ * @example {
8856
+ * "error": {
8857
+ * "statusCode": 403,
8858
+ * "code": null,
8859
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8860
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8861
+ * "path": "/api/v1/organizations",
8862
+ * "method": "GET"
8863
+ * }
8864
+ * }
8865
+ */
8866
+ "application/json": components["schemas"]["ErrorResponseDto"];
8867
+ };
8868
+ };
8869
+ /** @description No such invitation on this organization */
8870
+ 404: {
8871
+ headers: {
8872
+ [name: string]: unknown;
8873
+ };
8874
+ content: {
8875
+ /**
8876
+ * @example {
8877
+ * "error": {
8878
+ * "statusCode": 404,
8879
+ * "code": null,
8880
+ * "message": "No such invitation on this organization",
8881
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8882
+ * "path": "/api/v1/organizations/{id}/invites/{inviteId}",
8883
+ * "method": "DELETE"
8884
+ * }
8885
+ * }
8886
+ */
8887
+ "application/json": components["schemas"]["ErrorResponseDto"];
8888
+ };
8889
+ };
8890
+ };
8891
+ };
8892
+ ApiRolesController_listRoles: {
8893
+ parameters: {
8894
+ query?: {
8895
+ /** @description Include deactivated roles in the list. */
8896
+ include_inactive?: "true" | "false";
8897
+ /** @description Filter by role origin. */
8898
+ type?: "system" | "custom";
8899
+ };
8900
+ header?: never;
8901
+ path?: never;
8902
+ cookie?: never;
8903
+ };
8904
+ requestBody?: never;
8905
+ responses: {
8906
+ /** @description Roles returned */
8907
+ 200: {
8908
+ headers: {
8909
+ [name: string]: unknown;
8910
+ };
8911
+ content: {
8912
+ "application/json": {
8913
+ items: components["schemas"]["RoleResponseDto"][];
8914
+ };
8915
+ };
8916
+ };
8917
+ /** @description Invalid or expired token */
8918
+ 401: {
8919
+ headers: {
8920
+ [name: string]: unknown;
8921
+ };
8922
+ content: {
8923
+ /**
8924
+ * @example {
8925
+ * "error": {
8926
+ * "statusCode": 401,
8927
+ * "code": null,
8928
+ * "message": "Invalid or expired token",
8929
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8930
+ * "path": "/api/v1/roles",
8931
+ * "method": "GET"
8932
+ * }
8933
+ * }
8934
+ */
8935
+ "application/json": components["schemas"]["ErrorResponseDto"];
8936
+ };
8937
+ };
8938
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
8939
+ 403: {
8940
+ headers: {
8941
+ [name: string]: unknown;
8942
+ };
8943
+ content: {
8944
+ /**
8945
+ * @example {
8946
+ * "error": {
8947
+ * "statusCode": 403,
8948
+ * "code": null,
8949
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
8950
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8951
+ * "path": "/api/v1/roles",
8952
+ * "method": "GET"
8953
+ * }
8954
+ * }
8955
+ */
8956
+ "application/json": components["schemas"]["ErrorResponseDto"];
8957
+ };
8958
+ };
8959
+ };
8960
+ };
8961
+ ApiRolesController_createRole: {
8962
+ parameters: {
8963
+ query?: never;
8964
+ header?: never;
8965
+ path?: never;
8966
+ cookie?: never;
8967
+ };
8968
+ requestBody: {
8969
+ content: {
8970
+ "application/json": components["schemas"]["CreateRoleDto"];
8971
+ };
8972
+ };
8973
+ responses: {
8974
+ /** @description Role created */
8975
+ 201: {
8976
+ headers: {
8977
+ [name: string]: unknown;
8978
+ };
8979
+ content: {
8980
+ "application/json": {
8981
+ data: components["schemas"]["RoleResponseDto"];
8982
+ };
8983
+ };
8984
+ };
8985
+ /** @description Invalid or expired token */
8986
+ 401: {
8987
+ headers: {
8988
+ [name: string]: unknown;
8989
+ };
8990
+ content: {
8991
+ /**
8992
+ * @example {
8993
+ * "error": {
8994
+ * "statusCode": 401,
8995
+ * "code": null,
8996
+ * "message": "Invalid or expired token",
8997
+ * "timestamp": "2026-04-20T12:00:00.000Z",
8998
+ * "path": "/api/v1/roles",
8999
+ * "method": "GET"
9000
+ * }
9001
+ * }
9002
+ */
9003
+ "application/json": components["schemas"]["ErrorResponseDto"];
9004
+ };
9005
+ };
9006
+ /** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
9007
+ 403: {
9008
+ headers: {
9009
+ [name: string]: unknown;
9010
+ };
9011
+ content: {
9012
+ /**
9013
+ * @example {
9014
+ * "error": {
9015
+ * "statusCode": 403,
9016
+ * "code": null,
9017
+ * "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
9018
+ * "timestamp": "2026-04-20T12:00:00.000Z",
9019
+ * "path": "/api/v1/roles",
9020
+ * "method": "GET"
9021
+ * }
9022
+ * }
9023
+ */
9024
+ "application/json": components["schemas"]["ErrorResponseDto"];
9025
+ };
9026
+ };
9027
+ /** @description Role name already exists */
9028
+ 409: {
9029
+ headers: {
9030
+ [name: string]: unknown;
9031
+ };
9032
+ content: {
9033
+ /**
9034
+ * @example {
9035
+ * "error": {
9036
+ * "statusCode": 409,
9037
+ * "code": null,
9038
+ * "message": "Role name already exists",
9039
+ * "timestamp": "2026-04-20T12:00:00.000Z",
9040
+ * "path": "/api/v1/roles",
9041
+ * "method": "POST"
9042
+ * }
9043
+ * }
9044
+ */
9045
+ "application/json": components["schemas"]["ErrorResponseDto"];
9046
+ };
9047
+ };
9048
+ };
9049
+ };
9050
+ ApiRolesController_getRole: {
9051
+ parameters: {
9052
+ query?: never;
9053
+ header?: never;
9054
+ path: {
6948
9055
  id: string;
6949
9056
  };
6950
9057
  cookie?: never;
@@ -8163,7 +10270,7 @@ interface operations {
8163
10270
  to?: string;
8164
10271
  /** @description Filter by one or more action keys. Repeat the query param (`?action=a&action=b`) or pass a comma-separated string. */
8165
10272
  action?: string[];
8166
- category?: "auth" | "identity" | "admin_user" | "tenancy" | "hierarchy" | "rbac" | "authorization" | "api_keys" | "oauth" | "webhooks" | "invites" | "mfa" | "audit" | "billing" | "sso" | "unknown";
10273
+ category?: "auth" | "identity" | "admin_user" | "tenancy" | "hierarchy" | "organization" | "rbac" | "authorization" | "api_keys" | "oauth" | "webhooks" | "invites" | "mfa" | "audit" | "billing" | "sso" | "unknown";
8167
10274
  severity?: "info" | "notice" | "warning" | "critical";
8168
10275
  outcome?: "success" | "failure" | "denied";
8169
10276
  actor_id?: string;
@@ -10044,8 +12151,8 @@ declare class Assignments {
10044
12151
  /** Same partial-success contract as `bulkCreate`. */
10045
12152
  bulkChangeRole(input: RequestBody<"ApiAssignmentsController_bulkChangeRole">): Promise<ResponseBody<"ApiAssignmentsController_bulkChangeRole">>;
10046
12153
  }
10047
- type AssignmentItem = ItemOf$3<ResponseBody<"ApiAssignmentsController_listAppWideAssignments">>;
10048
- type ItemOf$3<T> = T extends {
12154
+ type AssignmentItem = ItemOf$4<ResponseBody<"ApiAssignmentsController_listAppWideAssignments">>;
12155
+ type ItemOf$4<T> = T extends {
10049
12156
  items: (infer Item)[];
10050
12157
  } ? Item : never;
10051
12158
 
@@ -10086,9 +12193,71 @@ declare class Identities {
10086
12193
  */
10087
12194
  permissions(id: string): Promise<ResponseBody<"ApiIdentitiesController_getIdentityPermissions">>;
10088
12195
  }
10089
- type IdentityItem = ItemOf$2<ResponseBody<"ApiIdentitiesController_listIdentities">>;
12196
+ type IdentityItem = ItemOf$3<ResponseBody<"ApiIdentitiesController_listIdentities">>;
10090
12197
  /** One role grant from an identity's assignments collection. */
10091
- type IdentityAssignmentItem = ItemOf$2<ResponseBody<"ApiIdentitiesController_getIdentityAssignments">>;
12198
+ type IdentityAssignmentItem = ItemOf$3<ResponseBody<"ApiIdentitiesController_getIdentityAssignments">>;
12199
+ type ItemOf$3<T> = T extends {
12200
+ items: (infer Item)[];
12201
+ } ? Item : never;
12202
+
12203
+ /**
12204
+ * Tenant organizations: one per business customer, a role per membership,
12205
+ * each with its own authentication policy and identity provider. Every
12206
+ * call here needs the Environment's organizations container switched on.
12207
+ */
12208
+ declare class Organizations {
12209
+ private readonly client;
12210
+ constructor(client: CanopyClient);
12211
+ list(query?: QueryParams<"ApiOrganizationsController_listOrganizations">): Paginator<OrganizationItem>;
12212
+ get(id: string): Promise<ResponseBody<"ApiOrganizationsController_getOrganization">>;
12213
+ create(input: RequestBody<"ApiOrganizationsController_createOrganization">): Promise<ResponseBody<"ApiOrganizationsController_createOrganization">>;
12214
+ /**
12215
+ * Pass `ifMatch` with the organization's current `version` to make a
12216
+ * read-modify-write safe — a concurrent edit answers 409 instead of being
12217
+ * silently overwritten.
12218
+ */
12219
+ update(id: string, input: RequestBody<"ApiOrganizationsController_updateOrganization">, options?: ConcurrencyOptions): Promise<ResponseBody<"ApiOrganizationsController_updateOrganization">>;
12220
+ /**
12221
+ * Removes the organization with its memberships, pending invitations,
12222
+ * policy, connection bindings, and the tree beneath it. Member identities
12223
+ * survive.
12224
+ */
12225
+ delete(id: string, options?: ConcurrencyOptions): Promise<void>;
12226
+ /** Empties the container: every organization goes, the step before switching it off. */
12227
+ deleteAll(): Promise<void>;
12228
+ listMembers(id: string, query?: QueryParams<"ApiOrganizationsController_listMembers">): Paginator<OrganizationMemberItem>;
12229
+ addMember(id: string, input: RequestBody<"ApiOrganizationsController_addMember">): Promise<ResponseBody<"ApiOrganizationsController_addMember">>;
12230
+ changeMemberRole(id: string, identityId: string, input: RequestBody<"ApiOrganizationsController_changeMemberRole">): Promise<ResponseBody<"ApiOrganizationsController_changeMemberRole">>;
12231
+ /** Revokes that organization's one role; the identity and its other memberships are untouched. */
12232
+ removeMember(id: string, identityId: string): Promise<void>;
12233
+ listInvites(id: string, query?: QueryParams<"ApiOrganizationsController_listInvites">): Paginator<OrganizationInviteItem>;
12234
+ createInvite(id: string, input: RequestBody<"ApiOrganizationsController_createInvite">): Promise<ResponseBody<"ApiOrganizationsController_createInvite">>;
12235
+ revokeInvite(id: string, inviteId: string): Promise<void>;
12236
+ /**
12237
+ * The organization's own values (null inherits), the Environment baseline
12238
+ * they tighten from, and the effective policy its members sign in under.
12239
+ */
12240
+ getPolicy(id: string): Promise<ResponseBody<"ApiOrganizationsController_getPolicy">>;
12241
+ /**
12242
+ * Can only tighten the Environment: a value that would loosen it answers
12243
+ * 400 `organization.policy_loosens`. Pass `ifMatch` with the policy's
12244
+ * `version` (0 until the organization sets one) for a safe
12245
+ * read-modify-write.
12246
+ */
12247
+ updatePolicy(id: string, input: RequestBody<"ApiOrganizationsController_updatePolicy">, options?: ConcurrencyOptions): Promise<ResponseBody<"ApiOrganizationsController_updatePolicy">>;
12248
+ listSsoConnections(id: string): Promise<ResponseBody<"ApiOrganizationsController_listSsoConnections">>;
12249
+ /**
12250
+ * Sign-ins through the connection then land in this organization, joining
12251
+ * as a member with `default_role_id`. The connection must already be bound
12252
+ * to the organization's Environment, and a connection binds to one
12253
+ * organization per Environment.
12254
+ */
12255
+ bindSsoConnection(id: string, input: RequestBody<"ApiOrganizationsController_bindSsoConnection">): Promise<ResponseBody<"ApiOrganizationsController_bindSsoConnection">>;
12256
+ unbindSsoConnection(id: string, connectionId: string): Promise<void>;
12257
+ }
12258
+ type OrganizationItem = ItemOf$2<ResponseBody<"ApiOrganizationsController_listOrganizations">>;
12259
+ type OrganizationMemberItem = ItemOf$2<ResponseBody<"ApiOrganizationsController_listMembers">>;
12260
+ type OrganizationInviteItem = ItemOf$2<ResponseBody<"ApiOrganizationsController_listInvites">>;
10092
12261
  type ItemOf$2<T> = T extends {
10093
12262
  items: (infer Item)[];
10094
12263
  } ? Item : never;
@@ -10195,7 +12364,7 @@ type ItemOf<T> = T extends {
10195
12364
  * ```
10196
12365
  *
10197
12366
  * `client` is public because the wrapped resources cover the paths integrators
10198
- * hit most, not all 81 operations. Anything not wrapped is still reachable —
12367
+ * hit most, not all 102 operations. Anything not wrapped is still reachable —
10199
12368
  * `canopy.client.request("GET", "/api/v1/audit-events")` — with the same
10200
12369
  * envelope handling, typed errors and retry policy, so no endpoint is a dead
10201
12370
  * end while the ergonomic surface catches up.
@@ -10206,6 +12375,7 @@ declare class Canopy {
10206
12375
  readonly identities: Identities;
10207
12376
  readonly roles: Roles;
10208
12377
  readonly assignments: Assignments;
12378
+ readonly organizations: Organizations;
10209
12379
  constructor(options: CanopyClientOptions);
10210
12380
  }
10211
12381
 
@@ -10546,8 +12716,54 @@ interface CanopyTokenClaims {
10546
12716
  permissions?: string[];
10547
12717
  /** True when `permissions` was truncated; query the API for the full set. */
10548
12718
  permissions_overflow?: boolean;
12719
+ /**
12720
+ * How the session was proven: `pwd`, `otp`, or `sso`, plus `mfa` once a
12721
+ * second factor was verified. Identity tokens carry it; check for `mfa`
12722
+ * before allowing a sensitive action.
12723
+ */
12724
+ amr?: string[];
12725
+ /**
12726
+ * The organization this session is acting in — present only on identity
12727
+ * tokens from an Environment with the organizations container on, for an
12728
+ * identity that belongs to at least one organization. Always minted
12729
+ * together with `org_role`; read the pair through {@link orgContext}
12730
+ * rather than separately.
12731
+ */
12732
+ org_id?: string;
12733
+ /** The name of the single role the identity holds in `org_id`. */
12734
+ org_role?: string;
10549
12735
  [claim: string]: unknown;
10550
12736
  }
12737
+ /**
12738
+ * The organization context a verified token carries: which organization the
12739
+ * session is acting in, and the one role it holds there.
12740
+ */
12741
+ interface CanopyOrgContext {
12742
+ /** The organization's id — also a hierarchy node id, usable as `node_id`. */
12743
+ orgId: string;
12744
+ /** The role's name (not its id): what `org_role` carries. */
12745
+ orgRole: string;
12746
+ }
12747
+ /**
12748
+ * The organization context of a verified token, or `null` when it has none.
12749
+ *
12750
+ * `null` is an ordinary answer, not a failure: it is every token from an
12751
+ * Environment without the organizations container on, and every identity
12752
+ * that belongs to no organization yet. Branch on it rather than on the raw claims —
12753
+ * Canopy mints `org_id` and `org_role` together, and this helper refuses a
12754
+ * half-present pair instead of letting one claim be read as though the other
12755
+ * were there.
12756
+ *
12757
+ * ```ts
12758
+ * const claims = await verifier.verify(token);
12759
+ * const org = orgContext(claims);
12760
+ *
12761
+ * if (org) {
12762
+ * // acting inside org.orgId as org.orgRole
12763
+ * }
12764
+ * ```
12765
+ */
12766
+ declare function orgContext(claims: CanopyTokenClaims): CanopyOrgContext | null;
10551
12767
  declare class TokenVerifier {
10552
12768
  private readonly issuer;
10553
12769
  private readonly audience;
@@ -10607,4 +12823,4 @@ declare class TokenVerifier {
10607
12823
  private fetchKeys;
10608
12824
  }
10609
12825
 
10610
- export { type AssignmentItem, Assignments, type CallOptions, Canopy, CanopyAuthorizerError, CanopyClient, type CanopyClientOptions, CanopyConnectionError, CanopyError, type CanopyErrorBody, type CanopyTokenClaims, CanopyTokenError, type Collection, type ConcurrencyOptions, type ConditionalResult, type CursorPagination, Identities, type IdentityAssignmentItem, type IdentityItem, type LocalAuthorizationQuery, LocalAuthorizer, type LocalAuthorizerOptions, type LocalAuthorizerStats, type OffsetPagination, type OperationId, type PageFetcher, type PageParams, type PaginateOptions, type Pagination, Paginator, type PartialSuccess, type PermissionItem, Permissions, type QueryParams, type RequestBody, type RequestOptions, type ResponseBody, type RoleItem, Roles, type Schema, TokenVerifier, type TokenVerifierOptions, type components, isCanopyAuthorizerError, isCanopyConnectionError, isCanopyError, isCanopyTokenError, isCursorPagination, type operations, paginate, type paths, withConcurrency };
12826
+ export { type AssignmentItem, Assignments, type CallOptions, Canopy, CanopyAuthorizerError, CanopyClient, type CanopyClientOptions, CanopyConnectionError, CanopyError, type CanopyErrorBody, type CanopyOrgContext, type CanopyTokenClaims, CanopyTokenError, type Collection, type ConcurrencyOptions, type ConditionalResult, type CursorPagination, Identities, type IdentityAssignmentItem, type IdentityItem, type LocalAuthorizationQuery, LocalAuthorizer, type LocalAuthorizerOptions, type LocalAuthorizerStats, type OffsetPagination, type OperationId, type OrganizationInviteItem, type OrganizationItem, type OrganizationMemberItem, Organizations, type PageFetcher, type PageParams, type PaginateOptions, type Pagination, Paginator, type PartialSuccess, type PermissionItem, Permissions, type QueryParams, type RequestBody, type RequestOptions, type ResponseBody, type RoleItem, Roles, type Schema, TokenVerifier, type TokenVerifierOptions, type components, isCanopyAuthorizerError, isCanopyConnectionError, isCanopyError, isCanopyTokenError, isCursorPagination, type operations, orgContext, paginate, type paths, withConcurrency };