@authhero/kysely-adapter 10.36.0 → 10.37.1
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 +43 -9
- package/dist/kysely-adapter.mjs +815 -711
- 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;
|
|
@@ -5837,6 +5846,31 @@ declare const roleSchema: z.ZodObject<{
|
|
|
5837
5846
|
}>;
|
|
5838
5847
|
export type Role = z.infer<typeof roleSchema>;
|
|
5839
5848
|
export type RoleInsert = z.infer<typeof roleInsertSchema>;
|
|
5849
|
+
export interface CacheAdapter {
|
|
5850
|
+
/**
|
|
5851
|
+
* Get a value from the cache
|
|
5852
|
+
* @param key The cache key
|
|
5853
|
+
* @returns The cached value or null if not found or expired
|
|
5854
|
+
*/
|
|
5855
|
+
get<T = any>(key: string): Promise<T | null>;
|
|
5856
|
+
/**
|
|
5857
|
+
* Set a value in the cache
|
|
5858
|
+
* @param key The cache key
|
|
5859
|
+
* @param value The value to cache
|
|
5860
|
+
* @param ttlSeconds Time to live in seconds (optional)
|
|
5861
|
+
*/
|
|
5862
|
+
set<T = any>(key: string, value: T, ttlSeconds?: number): Promise<void>;
|
|
5863
|
+
/**
|
|
5864
|
+
* Delete a value from the cache
|
|
5865
|
+
* @param key The cache key
|
|
5866
|
+
* @returns True if the key existed and was deleted, false otherwise
|
|
5867
|
+
*/
|
|
5868
|
+
delete(key: string): Promise<boolean>;
|
|
5869
|
+
/**
|
|
5870
|
+
* Clear all items from the cache
|
|
5871
|
+
*/
|
|
5872
|
+
clear(): Promise<void>;
|
|
5873
|
+
}
|
|
5840
5874
|
export interface ListCodesResponse extends Totals {
|
|
5841
5875
|
codes: Code[];
|
|
5842
5876
|
}
|
|
@@ -5926,9 +5960,12 @@ export interface CustomDomainsAdapter {
|
|
|
5926
5960
|
remove: (tenant_id: string, id: string) => Promise<boolean>;
|
|
5927
5961
|
update: (tenant_id: string, id: string, custom_domain: Partial<CustomDomain>) => Promise<boolean>;
|
|
5928
5962
|
}
|
|
5963
|
+
export interface ListKeysResponse extends Totals {
|
|
5964
|
+
signingKeys: SigningKey[];
|
|
5965
|
+
}
|
|
5929
5966
|
export interface KeysAdapter {
|
|
5930
5967
|
create: (key: SigningKey) => Promise<void>;
|
|
5931
|
-
list: () => Promise<
|
|
5968
|
+
list: (params?: ListParams) => Promise<ListKeysResponse>;
|
|
5932
5969
|
update: (kid: string, key: Partial<Omit<SigningKey, "kid">>) => Promise<boolean>;
|
|
5933
5970
|
}
|
|
5934
5971
|
export interface BrandingAdapter {
|
|
@@ -6009,12 +6046,8 @@ export interface UserPermissionsAdapter {
|
|
|
6009
6046
|
remove(tenant_id: string, user_id: string, permissions: Pick<UserPermissionInsert, "resource_server_identifier" | "permission_name">[]): Promise<boolean>;
|
|
6010
6047
|
list(tenant_id: string, user_id: string, params?: ListParams): Promise<UserPermissionWithDetailsList>;
|
|
6011
6048
|
}
|
|
6012
|
-
export interface ListRolesResponse {
|
|
6049
|
+
export interface ListRolesResponse extends Totals {
|
|
6013
6050
|
roles: Role[];
|
|
6014
|
-
totals?: Totals;
|
|
6015
|
-
start: number;
|
|
6016
|
-
limit: number;
|
|
6017
|
-
length: number;
|
|
6018
6051
|
}
|
|
6019
6052
|
export interface RolesAdapter {
|
|
6020
6053
|
create(tenantId: string, role: RoleInsert): Promise<Role>;
|
|
@@ -6031,6 +6064,7 @@ export interface UserRolesAdapter {
|
|
|
6031
6064
|
export interface DataAdapters {
|
|
6032
6065
|
applications: ApplicationsAdapter;
|
|
6033
6066
|
branding: BrandingAdapter;
|
|
6067
|
+
cache?: CacheAdapter;
|
|
6034
6068
|
clients: ClientsAdapter;
|
|
6035
6069
|
codes: CodesAdapter;
|
|
6036
6070
|
connections: ConnectionsAdapter;
|