authhero 0.193.0 → 0.195.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.
@@ -11513,9 +11513,9 @@ export declare const openIDConfigurationSchema: z.ZodObject<{
11513
11513
  token_endpoint_auth_signing_alg_values_supported: string[];
11514
11514
  }>;
11515
11515
  export interface ListParams {
11516
- page: number;
11517
- per_page: number;
11518
- include_totals: boolean;
11516
+ page?: number;
11517
+ per_page?: number;
11518
+ include_totals?: boolean;
11519
11519
  q?: string;
11520
11520
  sort?: {
11521
11521
  sort_by: string;
@@ -12252,11 +12252,18 @@ export declare const signingKeySchema: z.ZodObject<{
12252
12252
  current_until: z.ZodOptional<z.ZodString>;
12253
12253
  revoked: z.ZodOptional<z.ZodBoolean>;
12254
12254
  revoked_at: z.ZodOptional<z.ZodString>;
12255
+ connection: z.ZodOptional<z.ZodString>;
12256
+ type: z.ZodEnum<[
12257
+ "jwt_signing",
12258
+ "saml_encryption"
12259
+ ]>;
12255
12260
  }, "strip", z.ZodTypeAny, {
12261
+ type: "jwt_signing" | "saml_encryption";
12256
12262
  kid: string;
12257
12263
  cert: string;
12258
12264
  fingerprint: string;
12259
12265
  thumbprint: string;
12266
+ connection?: string | undefined;
12260
12267
  revoked_at?: string | undefined;
12261
12268
  pkcs7?: string | undefined;
12262
12269
  current?: boolean | undefined;
@@ -12266,10 +12273,12 @@ export declare const signingKeySchema: z.ZodObject<{
12266
12273
  current_until?: string | undefined;
12267
12274
  revoked?: boolean | undefined;
12268
12275
  }, {
12276
+ type: "jwt_signing" | "saml_encryption";
12269
12277
  kid: string;
12270
12278
  cert: string;
12271
12279
  fingerprint: string;
12272
12280
  thumbprint: string;
12281
+ connection?: string | undefined;
12273
12282
  revoked_at?: string | undefined;
12274
12283
  pkcs7?: string | undefined;
12275
12284
  current?: boolean | undefined;
@@ -14623,9 +14632,12 @@ export interface CustomDomainsAdapter {
14623
14632
  remove: (tenant_id: string, id: string) => Promise<boolean>;
14624
14633
  update: (tenant_id: string, id: string, custom_domain: Partial<CustomDomain>) => Promise<boolean>;
14625
14634
  }
14635
+ export interface ListKeysResponse extends Totals {
14636
+ signingKeys: SigningKey[];
14637
+ }
14626
14638
  export interface KeysAdapter {
14627
14639
  create: (key: SigningKey) => Promise<void>;
14628
- list: () => Promise<SigningKey[]>;
14640
+ list: (params?: ListParams) => Promise<ListKeysResponse>;
14629
14641
  update: (kid: string, key: Partial<Omit<SigningKey, "kid">>) => Promise<boolean>;
14630
14642
  }
14631
14643
  export interface BrandingAdapter {
@@ -14706,12 +14718,8 @@ export interface UserPermissionsAdapter {
14706
14718
  remove(tenant_id: string, user_id: string, permissions: Pick<UserPermissionInsert, "resource_server_identifier" | "permission_name">[]): Promise<boolean>;
14707
14719
  list(tenant_id: string, user_id: string, params?: ListParams): Promise<UserPermissionWithDetailsList>;
14708
14720
  }
14709
- export interface ListRolesResponse {
14721
+ export interface ListRolesResponse extends Totals {
14710
14722
  roles: Role[];
14711
- totals?: Totals;
14712
- start: number;
14713
- limit: number;
14714
- length: number;
14715
14723
  }
14716
14724
  export interface RolesAdapter {
14717
14725
  create(tenantId: string, role: RoleInsert): Promise<Role>;
@@ -14720,6 +14728,17 @@ export interface RolesAdapter {
14720
14728
  update(tenantId: string, roleId: string, updates: Partial<Role>): Promise<boolean>;
14721
14729
  remove(tenantId: string, roleId: string): Promise<boolean>;
14722
14730
  }
14731
+ export interface ListUserRolesResponse {
14732
+ roles: Role[];
14733
+ start: number;
14734
+ limit: number;
14735
+ length: number;
14736
+ }
14737
+ export interface UserRolesAdapter {
14738
+ list(tenantId: string, userId: string, params?: ListParams): Promise<Role[]>;
14739
+ assign(tenantId: string, userId: string, roles: string[]): Promise<boolean>;
14740
+ remove(tenantId: string, userId: string, roles: string[]): Promise<boolean>;
14741
+ }
14723
14742
  export interface DataAdapters {
14724
14743
  applications: ApplicationsAdapter;
14725
14744
  branding: BrandingAdapter;
@@ -14744,6 +14763,7 @@ export interface DataAdapters {
14744
14763
  tenants: TenantsDataAdapter;
14745
14764
  themes: ThemesAdapter;
14746
14765
  users: UserDataAdapter;
14766
+ userRoles: UserRolesAdapter;
14747
14767
  }
14748
14768
  declare const auth0ClientSchema: z.ZodObject<{
14749
14769
  name: z.ZodString;
@@ -17952,10 +17972,12 @@ export declare function init(config: AuthHeroConfig): {
17952
17972
  };
17953
17973
  };
17954
17974
  output: {
17975
+ type: "jwt_signing" | "saml_encryption";
17955
17976
  kid: string;
17956
17977
  cert: string;
17957
17978
  fingerprint: string;
17958
17979
  thumbprint: string;
17980
+ connection?: string | undefined | undefined;
17959
17981
  revoked_at?: string | undefined | undefined;
17960
17982
  pkcs7?: string | undefined | undefined;
17961
17983
  current?: boolean | undefined | undefined;
@@ -17982,10 +18004,12 @@ export declare function init(config: AuthHeroConfig): {
17982
18004
  };
17983
18005
  };
17984
18006
  output: {
18007
+ type: "jwt_signing" | "saml_encryption";
17985
18008
  kid: string;
17986
18009
  cert: string;
17987
18010
  fingerprint: string;
17988
18011
  thumbprint: string;
18012
+ connection?: string | undefined | undefined;
17989
18013
  revoked_at?: string | undefined | undefined;
17990
18014
  pkcs7?: string | undefined | undefined;
17991
18015
  current?: boolean | undefined | undefined;
@@ -18594,6 +18618,71 @@ export declare function init(config: AuthHeroConfig): {
18594
18618
  status: 200;
18595
18619
  };
18596
18620
  };
18621
+ } & {
18622
+ "/:user_id/roles": {
18623
+ $get: {
18624
+ input: {
18625
+ param: {
18626
+ user_id: string;
18627
+ };
18628
+ } & {
18629
+ header: {
18630
+ "tenant-id": string;
18631
+ };
18632
+ };
18633
+ output: {
18634
+ name: string;
18635
+ id: string;
18636
+ description?: string | undefined | undefined;
18637
+ created_at?: string | undefined | undefined;
18638
+ updated_at?: string | undefined | undefined;
18639
+ }[];
18640
+ outputFormat: "json";
18641
+ status: 200;
18642
+ };
18643
+ };
18644
+ } & {
18645
+ "/:user_id/roles": {
18646
+ $post: {
18647
+ input: {
18648
+ param: {
18649
+ user_id: string;
18650
+ };
18651
+ } & {
18652
+ header: {
18653
+ "tenant-id": string;
18654
+ };
18655
+ } & {
18656
+ json: {
18657
+ roles: string[];
18658
+ };
18659
+ };
18660
+ output: {};
18661
+ outputFormat: string;
18662
+ status: 201;
18663
+ };
18664
+ };
18665
+ } & {
18666
+ "/:user_id/roles": {
18667
+ $delete: {
18668
+ input: {
18669
+ param: {
18670
+ user_id: string;
18671
+ };
18672
+ } & {
18673
+ header: {
18674
+ "tenant-id": string;
18675
+ };
18676
+ } & {
18677
+ json: {
18678
+ roles: string[];
18679
+ };
18680
+ };
18681
+ output: {};
18682
+ outputFormat: string;
18683
+ status: 200;
18684
+ };
18685
+ };
18597
18686
  }, "/users"> & import("hono/types").MergeSchemaPath<{
18598
18687
  "/": {
18599
18688
  $get: {