@authhero/kysely-adapter 10.35.0 → 10.37.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/kysely-adapter.cjs +1 -1
- package/dist/kysely-adapter.d.ts +40 -9
- package/dist/kysely-adapter.mjs +1433 -1265
- package/package.json +3 -3
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -3545,9 +3545,9 @@ declare const hookSchema: z.ZodUnion<[
|
|
|
3545
3545
|
]>;
|
|
3546
3546
|
export type Hook = z.infer<typeof hookSchema>;
|
|
3547
3547
|
export interface ListParams {
|
|
3548
|
-
page
|
|
3549
|
-
per_page
|
|
3550
|
-
include_totals
|
|
3548
|
+
page?: number;
|
|
3549
|
+
per_page?: number;
|
|
3550
|
+
include_totals?: boolean;
|
|
3551
3551
|
q?: string;
|
|
3552
3552
|
sort?: {
|
|
3553
3553
|
sort_by: string;
|
|
@@ -4261,11 +4261,18 @@ declare const signingKeySchema: z.ZodObject<{
|
|
|
4261
4261
|
current_until: z.ZodOptional<z.ZodString>;
|
|
4262
4262
|
revoked: z.ZodOptional<z.ZodBoolean>;
|
|
4263
4263
|
revoked_at: z.ZodOptional<z.ZodString>;
|
|
4264
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
4265
|
+
type: z.ZodEnum<[
|
|
4266
|
+
"jwt_signing",
|
|
4267
|
+
"saml_encryption"
|
|
4268
|
+
]>;
|
|
4264
4269
|
}, "strip", z.ZodTypeAny, {
|
|
4270
|
+
type: "jwt_signing" | "saml_encryption";
|
|
4265
4271
|
kid: string;
|
|
4266
4272
|
cert: string;
|
|
4267
4273
|
fingerprint: string;
|
|
4268
4274
|
thumbprint: string;
|
|
4275
|
+
connection?: string | undefined;
|
|
4269
4276
|
revoked_at?: string | undefined;
|
|
4270
4277
|
pkcs7?: string | undefined;
|
|
4271
4278
|
current?: boolean | undefined;
|
|
@@ -4275,10 +4282,12 @@ declare const signingKeySchema: z.ZodObject<{
|
|
|
4275
4282
|
current_until?: string | undefined;
|
|
4276
4283
|
revoked?: boolean | undefined;
|
|
4277
4284
|
}, {
|
|
4285
|
+
type: "jwt_signing" | "saml_encryption";
|
|
4278
4286
|
kid: string;
|
|
4279
4287
|
cert: string;
|
|
4280
4288
|
fingerprint: string;
|
|
4281
4289
|
thumbprint: string;
|
|
4290
|
+
connection?: string | undefined;
|
|
4282
4291
|
revoked_at?: string | undefined;
|
|
4283
4292
|
pkcs7?: string | undefined;
|
|
4284
4293
|
current?: boolean | undefined;
|
|
@@ -5926,9 +5935,12 @@ export interface CustomDomainsAdapter {
|
|
|
5926
5935
|
remove: (tenant_id: string, id: string) => Promise<boolean>;
|
|
5927
5936
|
update: (tenant_id: string, id: string, custom_domain: Partial<CustomDomain>) => Promise<boolean>;
|
|
5928
5937
|
}
|
|
5938
|
+
export interface ListKeysResponse extends Totals {
|
|
5939
|
+
signingKeys: SigningKey[];
|
|
5940
|
+
}
|
|
5929
5941
|
export interface KeysAdapter {
|
|
5930
5942
|
create: (key: SigningKey) => Promise<void>;
|
|
5931
|
-
list: () => Promise<
|
|
5943
|
+
list: (params?: ListParams) => Promise<ListKeysResponse>;
|
|
5932
5944
|
update: (kid: string, key: Partial<Omit<SigningKey, "kid">>) => Promise<boolean>;
|
|
5933
5945
|
}
|
|
5934
5946
|
export interface BrandingAdapter {
|
|
@@ -6009,12 +6021,8 @@ export interface UserPermissionsAdapter {
|
|
|
6009
6021
|
remove(tenant_id: string, user_id: string, permissions: Pick<UserPermissionInsert, "resource_server_identifier" | "permission_name">[]): Promise<boolean>;
|
|
6010
6022
|
list(tenant_id: string, user_id: string, params?: ListParams): Promise<UserPermissionWithDetailsList>;
|
|
6011
6023
|
}
|
|
6012
|
-
export interface ListRolesResponse {
|
|
6024
|
+
export interface ListRolesResponse extends Totals {
|
|
6013
6025
|
roles: Role[];
|
|
6014
|
-
totals?: Totals;
|
|
6015
|
-
start: number;
|
|
6016
|
-
limit: number;
|
|
6017
|
-
length: number;
|
|
6018
6026
|
}
|
|
6019
6027
|
export interface RolesAdapter {
|
|
6020
6028
|
create(tenantId: string, role: RoleInsert): Promise<Role>;
|
|
@@ -6023,6 +6031,11 @@ export interface RolesAdapter {
|
|
|
6023
6031
|
update(tenantId: string, roleId: string, updates: Partial<Role>): Promise<boolean>;
|
|
6024
6032
|
remove(tenantId: string, roleId: string): Promise<boolean>;
|
|
6025
6033
|
}
|
|
6034
|
+
export interface UserRolesAdapter {
|
|
6035
|
+
list(tenantId: string, userId: string, params?: ListParams): Promise<Role[]>;
|
|
6036
|
+
assign(tenantId: string, userId: string, roles: string[]): Promise<boolean>;
|
|
6037
|
+
remove(tenantId: string, userId: string, roles: string[]): Promise<boolean>;
|
|
6038
|
+
}
|
|
6026
6039
|
export interface DataAdapters {
|
|
6027
6040
|
applications: ApplicationsAdapter;
|
|
6028
6041
|
branding: BrandingAdapter;
|
|
@@ -6047,6 +6060,7 @@ export interface DataAdapters {
|
|
|
6047
6060
|
tenants: TenantsDataAdapter;
|
|
6048
6061
|
themes: ThemesAdapter;
|
|
6049
6062
|
users: UserDataAdapter;
|
|
6063
|
+
userRoles: UserRolesAdapter;
|
|
6050
6064
|
}
|
|
6051
6065
|
export interface SqlLog {
|
|
6052
6066
|
id: string;
|
|
@@ -6822,6 +6836,22 @@ declare const sqlUserPermissionSchema: z.ZodObject<{
|
|
|
6822
6836
|
resource_server_identifier: string;
|
|
6823
6837
|
permission_name: string;
|
|
6824
6838
|
}>;
|
|
6839
|
+
declare const sqlUserRoleSchema: z.ZodObject<{
|
|
6840
|
+
tenant_id: z.ZodString;
|
|
6841
|
+
user_id: z.ZodString;
|
|
6842
|
+
role_id: z.ZodString;
|
|
6843
|
+
created_at: z.ZodString;
|
|
6844
|
+
}, "strip", z.ZodTypeAny, {
|
|
6845
|
+
tenant_id: string;
|
|
6846
|
+
created_at: string;
|
|
6847
|
+
user_id: string;
|
|
6848
|
+
role_id: string;
|
|
6849
|
+
}, {
|
|
6850
|
+
tenant_id: string;
|
|
6851
|
+
created_at: string;
|
|
6852
|
+
user_id: string;
|
|
6853
|
+
role_id: string;
|
|
6854
|
+
}>;
|
|
6825
6855
|
export interface Database {
|
|
6826
6856
|
applications: z.infer<typeof sqlApplicationSchema>;
|
|
6827
6857
|
branding: z.infer<typeof sqlBrandingSchema>;
|
|
@@ -6850,6 +6880,7 @@ export interface Database {
|
|
|
6850
6880
|
resource_servers: z.infer<typeof sqlResourceServerSchema>;
|
|
6851
6881
|
role_permissions: z.infer<typeof sqlRolePermissionSchema>;
|
|
6852
6882
|
user_permissions: z.infer<typeof sqlUserPermissionSchema>;
|
|
6883
|
+
user_roles: z.infer<typeof sqlUserRoleSchema>;
|
|
6853
6884
|
roles: z.infer<typeof sqlRoleSchema>;
|
|
6854
6885
|
}
|
|
6855
6886
|
export declare function migrateToLatest(db: Kysely<Database>, debug?: boolean): Promise<void>;
|