@authhero/kysely-adapter 10.34.0 → 10.36.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 +23 -0
- package/dist/kysely-adapter.mjs +747 -670
- package/package.json +3 -3
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -6023,6 +6023,11 @@ export interface RolesAdapter {
|
|
|
6023
6023
|
update(tenantId: string, roleId: string, updates: Partial<Role>): Promise<boolean>;
|
|
6024
6024
|
remove(tenantId: string, roleId: string): Promise<boolean>;
|
|
6025
6025
|
}
|
|
6026
|
+
export interface UserRolesAdapter {
|
|
6027
|
+
list(tenantId: string, userId: string, params?: ListParams): Promise<Role[]>;
|
|
6028
|
+
assign(tenantId: string, userId: string, roles: string[]): Promise<boolean>;
|
|
6029
|
+
remove(tenantId: string, userId: string, roles: string[]): Promise<boolean>;
|
|
6030
|
+
}
|
|
6026
6031
|
export interface DataAdapters {
|
|
6027
6032
|
applications: ApplicationsAdapter;
|
|
6028
6033
|
branding: BrandingAdapter;
|
|
@@ -6047,6 +6052,7 @@ export interface DataAdapters {
|
|
|
6047
6052
|
tenants: TenantsDataAdapter;
|
|
6048
6053
|
themes: ThemesAdapter;
|
|
6049
6054
|
users: UserDataAdapter;
|
|
6055
|
+
userRoles: UserRolesAdapter;
|
|
6050
6056
|
}
|
|
6051
6057
|
export interface SqlLog {
|
|
6052
6058
|
id: string;
|
|
@@ -6822,6 +6828,22 @@ declare const sqlUserPermissionSchema: z.ZodObject<{
|
|
|
6822
6828
|
resource_server_identifier: string;
|
|
6823
6829
|
permission_name: string;
|
|
6824
6830
|
}>;
|
|
6831
|
+
declare const sqlUserRoleSchema: z.ZodObject<{
|
|
6832
|
+
tenant_id: z.ZodString;
|
|
6833
|
+
user_id: z.ZodString;
|
|
6834
|
+
role_id: z.ZodString;
|
|
6835
|
+
created_at: z.ZodString;
|
|
6836
|
+
}, "strip", z.ZodTypeAny, {
|
|
6837
|
+
tenant_id: string;
|
|
6838
|
+
created_at: string;
|
|
6839
|
+
user_id: string;
|
|
6840
|
+
role_id: string;
|
|
6841
|
+
}, {
|
|
6842
|
+
tenant_id: string;
|
|
6843
|
+
created_at: string;
|
|
6844
|
+
user_id: string;
|
|
6845
|
+
role_id: string;
|
|
6846
|
+
}>;
|
|
6825
6847
|
export interface Database {
|
|
6826
6848
|
applications: z.infer<typeof sqlApplicationSchema>;
|
|
6827
6849
|
branding: z.infer<typeof sqlBrandingSchema>;
|
|
@@ -6850,6 +6872,7 @@ export interface Database {
|
|
|
6850
6872
|
resource_servers: z.infer<typeof sqlResourceServerSchema>;
|
|
6851
6873
|
role_permissions: z.infer<typeof sqlRolePermissionSchema>;
|
|
6852
6874
|
user_permissions: z.infer<typeof sqlUserPermissionSchema>;
|
|
6875
|
+
user_roles: z.infer<typeof sqlUserRoleSchema>;
|
|
6853
6876
|
roles: z.infer<typeof sqlRoleSchema>;
|
|
6854
6877
|
}
|
|
6855
6878
|
export declare function migrateToLatest(db: Kysely<Database>, debug?: boolean): Promise<void>;
|