@authhero/adapter-interfaces 3.12.0 → 4.1.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.
@@ -7,8 +7,27 @@ export interface ListUserRolesResponse {
7
7
  limit: number;
8
8
  length: number;
9
9
  }
10
+ export interface ListRoleUsersResponse {
11
+ /** Distinct user ids holding the role, ordered by user_id ascending. */
12
+ userIds: string[];
13
+ start: number;
14
+ limit: number;
15
+ /**
16
+ * Offset mode: total number of distinct users holding the role.
17
+ * Checkpoint mode: number of ids in this page (no total is computed).
18
+ */
19
+ length: number;
20
+ /** Opaque checkpoint cursor for the next page; absent on the last page. */
21
+ next?: string;
22
+ }
10
23
  export interface UserRolesAdapter {
11
24
  list(tenantId: string, userId: string, params?: ListParams, organizationId?: string): Promise<Role[]>;
25
+ /**
26
+ * List the distinct users assigned to a role, across all organization
27
+ * scopes (a user holding the role in several organizations appears once).
28
+ * Supports offset (page/per_page) and checkpoint (from/take) pagination.
29
+ */
30
+ listUsers(tenantId: string, roleId: string, params?: ListParams): Promise<ListRoleUsersResponse>;
12
31
  create(tenantId: string, userId: string, roleId: string, organizationId?: string, options?: CreateOptions): Promise<boolean>;
13
32
  remove(tenantId: string, userId: string, roleId: string, organizationId?: string): Promise<boolean>;
14
33
  }
@@ -44,7 +44,16 @@ export declare const clientInsertSchema: z.ZodObject<{
44
44
  connections: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
45
45
  allowed_logout_urls: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
46
46
  session_transfer: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
47
- oidc_logout: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
47
+ oidc_logout: z.ZodOptional<z.ZodDefault<z.ZodObject<{
48
+ backchannel_logout_urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
+ backchannel_logout_initiators: z.ZodOptional<z.ZodObject<{
50
+ mode: z.ZodOptional<z.ZodEnum<{
51
+ custom: "custom";
52
+ all: "all";
53
+ }>>;
54
+ selected_initiators: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
+ }, z.core.$loose>>;
56
+ }, z.core.$loose>>>;
48
57
  grant_types: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
49
58
  jwt_configuration: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
50
59
  signing_keys: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
@@ -168,7 +177,16 @@ export declare const clientSchema: z.ZodObject<{
168
177
  connections: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
169
178
  allowed_logout_urls: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
170
179
  session_transfer: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
171
- oidc_logout: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
180
+ oidc_logout: z.ZodOptional<z.ZodDefault<z.ZodObject<{
181
+ backchannel_logout_urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
182
+ backchannel_logout_initiators: z.ZodOptional<z.ZodObject<{
183
+ mode: z.ZodOptional<z.ZodEnum<{
184
+ custom: "custom";
185
+ all: "all";
186
+ }>>;
187
+ selected_initiators: z.ZodOptional<z.ZodArray<z.ZodString>>;
188
+ }, z.core.$loose>>;
189
+ }, z.core.$loose>>>;
172
190
  grant_types: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
173
191
  jwt_configuration: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
174
192
  signing_keys: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
@@ -87,4 +87,6 @@ export declare const openIDConfigurationSchema: z.ZodObject<{
87
87
  request_object_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
88
  token_endpoint_auth_signing_alg_values_supported: z.ZodArray<z.ZodString>;
89
89
  client_id_metadata_document_supported: z.ZodOptional<z.ZodBoolean>;
90
+ backchannel_logout_supported: z.ZodOptional<z.ZodBoolean>;
91
+ backchannel_logout_session_supported: z.ZodOptional<z.ZodBoolean>;
90
92
  }, z.core.$strip>;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "3.12.0",
14
+ "version": "4.1.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],