@authhero/kysely-adapter 5.0.0 → 6.0.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 +174 -26
- package/dist/kysely-adapter.mjs +757 -714
- package/package.json +2 -2
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -1932,52 +1932,155 @@ declare const passwordSchema: z.ZodObject<{
|
|
|
1932
1932
|
}>;
|
|
1933
1933
|
export type Password = z.infer<typeof passwordSchema>;
|
|
1934
1934
|
declare const sessionInsertSchema: z.ZodObject<{
|
|
1935
|
-
|
|
1935
|
+
id: z.ZodString;
|
|
1936
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
1936
1937
|
client_id: z.ZodString;
|
|
1937
|
-
|
|
1938
|
+
revoked_at: z.ZodOptional<z.ZodString>;
|
|
1938
1939
|
used_at: z.ZodString;
|
|
1939
|
-
deleted_at: z.ZodOptional<z.ZodString>;
|
|
1940
1940
|
user_id: z.ZodString;
|
|
1941
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
1942
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
1943
|
+
device: z.ZodObject<{
|
|
1944
|
+
initial_user_agent: z.ZodString;
|
|
1945
|
+
initial_ip: z.ZodString;
|
|
1946
|
+
initial_asn: z.ZodString;
|
|
1947
|
+
last_user_agent: z.ZodString;
|
|
1948
|
+
last_ip: z.ZodString;
|
|
1949
|
+
last_asn: z.ZodString;
|
|
1950
|
+
}, "strip", z.ZodTypeAny, {
|
|
1951
|
+
last_ip: string;
|
|
1952
|
+
initial_user_agent: string;
|
|
1953
|
+
initial_ip: string;
|
|
1954
|
+
initial_asn: string;
|
|
1955
|
+
last_user_agent: string;
|
|
1956
|
+
last_asn: string;
|
|
1957
|
+
}, {
|
|
1958
|
+
last_ip: string;
|
|
1959
|
+
initial_user_agent: string;
|
|
1960
|
+
initial_ip: string;
|
|
1961
|
+
initial_asn: string;
|
|
1962
|
+
last_user_agent: string;
|
|
1963
|
+
last_asn: string;
|
|
1964
|
+
}>;
|
|
1965
|
+
clients: z.ZodArray<z.ZodString, "many">;
|
|
1941
1966
|
}, "strip", z.ZodTypeAny, {
|
|
1942
1967
|
user_id: string;
|
|
1968
|
+
id: string;
|
|
1943
1969
|
client_id: string;
|
|
1944
|
-
expires_at: string;
|
|
1945
1970
|
used_at: string;
|
|
1946
|
-
|
|
1947
|
-
|
|
1971
|
+
device: {
|
|
1972
|
+
last_ip: string;
|
|
1973
|
+
initial_user_agent: string;
|
|
1974
|
+
initial_ip: string;
|
|
1975
|
+
initial_asn: string;
|
|
1976
|
+
last_user_agent: string;
|
|
1977
|
+
last_asn: string;
|
|
1978
|
+
};
|
|
1979
|
+
clients: string[];
|
|
1980
|
+
expires_at?: string | undefined;
|
|
1981
|
+
session_id?: string | undefined;
|
|
1982
|
+
revoked_at?: string | undefined;
|
|
1983
|
+
idle_expires_at?: string | undefined;
|
|
1948
1984
|
}, {
|
|
1949
1985
|
user_id: string;
|
|
1986
|
+
id: string;
|
|
1950
1987
|
client_id: string;
|
|
1951
|
-
expires_at: string;
|
|
1952
1988
|
used_at: string;
|
|
1953
|
-
|
|
1954
|
-
|
|
1989
|
+
device: {
|
|
1990
|
+
last_ip: string;
|
|
1991
|
+
initial_user_agent: string;
|
|
1992
|
+
initial_ip: string;
|
|
1993
|
+
initial_asn: string;
|
|
1994
|
+
last_user_agent: string;
|
|
1995
|
+
last_asn: string;
|
|
1996
|
+
};
|
|
1997
|
+
clients: string[];
|
|
1998
|
+
expires_at?: string | undefined;
|
|
1999
|
+
session_id?: string | undefined;
|
|
2000
|
+
revoked_at?: string | undefined;
|
|
2001
|
+
idle_expires_at?: string | undefined;
|
|
1955
2002
|
}>;
|
|
1956
2003
|
export type SessionInsert = z.infer<typeof sessionInsertSchema>;
|
|
1957
2004
|
declare const sessionSchema: z.ZodObject<{
|
|
1958
|
-
|
|
2005
|
+
id: z.ZodString;
|
|
2006
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
1959
2007
|
client_id: z.ZodString;
|
|
1960
|
-
|
|
2008
|
+
revoked_at: z.ZodOptional<z.ZodString>;
|
|
1961
2009
|
used_at: z.ZodString;
|
|
1962
|
-
deleted_at: z.ZodOptional<z.ZodString>;
|
|
1963
2010
|
user_id: z.ZodString;
|
|
2011
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
2012
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
2013
|
+
device: z.ZodObject<{
|
|
2014
|
+
initial_user_agent: z.ZodString;
|
|
2015
|
+
initial_ip: z.ZodString;
|
|
2016
|
+
initial_asn: z.ZodString;
|
|
2017
|
+
last_user_agent: z.ZodString;
|
|
2018
|
+
last_ip: z.ZodString;
|
|
2019
|
+
last_asn: z.ZodString;
|
|
2020
|
+
}, "strip", z.ZodTypeAny, {
|
|
2021
|
+
last_ip: string;
|
|
2022
|
+
initial_user_agent: string;
|
|
2023
|
+
initial_ip: string;
|
|
2024
|
+
initial_asn: string;
|
|
2025
|
+
last_user_agent: string;
|
|
2026
|
+
last_asn: string;
|
|
2027
|
+
}, {
|
|
2028
|
+
last_ip: string;
|
|
2029
|
+
initial_user_agent: string;
|
|
2030
|
+
initial_ip: string;
|
|
2031
|
+
initial_asn: string;
|
|
2032
|
+
last_user_agent: string;
|
|
2033
|
+
last_asn: string;
|
|
2034
|
+
}>;
|
|
2035
|
+
clients: z.ZodArray<z.ZodString, "many">;
|
|
1964
2036
|
created_at: z.ZodString;
|
|
2037
|
+
updated_at: z.ZodString;
|
|
2038
|
+
authenticated_at: z.ZodString;
|
|
2039
|
+
last_interaction_at: z.ZodString;
|
|
1965
2040
|
}, "strip", z.ZodTypeAny, {
|
|
1966
2041
|
created_at: string;
|
|
2042
|
+
updated_at: string;
|
|
1967
2043
|
user_id: string;
|
|
2044
|
+
id: string;
|
|
1968
2045
|
client_id: string;
|
|
1969
|
-
expires_at: string;
|
|
1970
2046
|
used_at: string;
|
|
1971
|
-
|
|
1972
|
-
|
|
2047
|
+
device: {
|
|
2048
|
+
last_ip: string;
|
|
2049
|
+
initial_user_agent: string;
|
|
2050
|
+
initial_ip: string;
|
|
2051
|
+
initial_asn: string;
|
|
2052
|
+
last_user_agent: string;
|
|
2053
|
+
last_asn: string;
|
|
2054
|
+
};
|
|
2055
|
+
clients: string[];
|
|
2056
|
+
authenticated_at: string;
|
|
2057
|
+
last_interaction_at: string;
|
|
2058
|
+
expires_at?: string | undefined;
|
|
2059
|
+
session_id?: string | undefined;
|
|
2060
|
+
revoked_at?: string | undefined;
|
|
2061
|
+
idle_expires_at?: string | undefined;
|
|
1973
2062
|
}, {
|
|
1974
2063
|
created_at: string;
|
|
2064
|
+
updated_at: string;
|
|
1975
2065
|
user_id: string;
|
|
2066
|
+
id: string;
|
|
1976
2067
|
client_id: string;
|
|
1977
|
-
expires_at: string;
|
|
1978
2068
|
used_at: string;
|
|
1979
|
-
|
|
1980
|
-
|
|
2069
|
+
device: {
|
|
2070
|
+
last_ip: string;
|
|
2071
|
+
initial_user_agent: string;
|
|
2072
|
+
initial_ip: string;
|
|
2073
|
+
initial_asn: string;
|
|
2074
|
+
last_user_agent: string;
|
|
2075
|
+
last_asn: string;
|
|
2076
|
+
};
|
|
2077
|
+
clients: string[];
|
|
2078
|
+
authenticated_at: string;
|
|
2079
|
+
last_interaction_at: string;
|
|
2080
|
+
expires_at?: string | undefined;
|
|
2081
|
+
session_id?: string | undefined;
|
|
2082
|
+
revoked_at?: string | undefined;
|
|
2083
|
+
idle_expires_at?: string | undefined;
|
|
1981
2084
|
}>;
|
|
1982
2085
|
export type Session = z.infer<typeof sessionSchema>;
|
|
1983
2086
|
declare const signingKeySchema: z.ZodObject<{
|
|
@@ -1998,6 +2101,7 @@ declare const signingKeySchema: z.ZodObject<{
|
|
|
1998
2101
|
cert: string;
|
|
1999
2102
|
fingerprint: string;
|
|
2000
2103
|
thumbprint: string;
|
|
2104
|
+
revoked_at?: string | undefined;
|
|
2001
2105
|
pkcs7?: string | undefined;
|
|
2002
2106
|
current?: boolean | undefined;
|
|
2003
2107
|
next?: boolean | undefined;
|
|
@@ -2005,12 +2109,12 @@ declare const signingKeySchema: z.ZodObject<{
|
|
|
2005
2109
|
current_since?: string | undefined;
|
|
2006
2110
|
current_until?: string | undefined;
|
|
2007
2111
|
revoked?: boolean | undefined;
|
|
2008
|
-
revoked_at?: string | undefined;
|
|
2009
2112
|
}, {
|
|
2010
2113
|
kid: string;
|
|
2011
2114
|
cert: string;
|
|
2012
2115
|
fingerprint: string;
|
|
2013
2116
|
thumbprint: string;
|
|
2117
|
+
revoked_at?: string | undefined;
|
|
2014
2118
|
pkcs7?: string | undefined;
|
|
2015
2119
|
current?: boolean | undefined;
|
|
2016
2120
|
next?: boolean | undefined;
|
|
@@ -2018,7 +2122,6 @@ declare const signingKeySchema: z.ZodObject<{
|
|
|
2018
2122
|
current_since?: string | undefined;
|
|
2019
2123
|
current_until?: string | undefined;
|
|
2020
2124
|
revoked?: boolean | undefined;
|
|
2021
|
-
revoked_at?: string | undefined;
|
|
2022
2125
|
}>;
|
|
2023
2126
|
export type SigningKey = z.infer<typeof signingKeySchema>;
|
|
2024
2127
|
export interface Tenant {
|
|
@@ -3082,9 +3185,7 @@ export interface SessionsAdapter {
|
|
|
3082
3185
|
create: (tenant_id: string, session: SessionInsert) => Promise<Session>;
|
|
3083
3186
|
get: (tenant_id: string, id: string) => Promise<Session | null>;
|
|
3084
3187
|
list(tenantId: string, params?: ListParams): Promise<ListSesssionsResponse>;
|
|
3085
|
-
update: (tenant_id: string, id: string, session:
|
|
3086
|
-
used_at: string;
|
|
3087
|
-
}) => Promise<boolean>;
|
|
3188
|
+
update: (tenant_id: string, id: string, session: Partial<Session>) => Promise<boolean>;
|
|
3088
3189
|
remove: (tenant_id: string, id: string) => Promise<boolean>;
|
|
3089
3190
|
}
|
|
3090
3191
|
export interface CreateTenantParams {
|
|
@@ -3605,6 +3706,55 @@ declare const sqlEmailProvidersSchema: z.ZodObject<{
|
|
|
3605
3706
|
settings: string;
|
|
3606
3707
|
default_from_address?: string | undefined;
|
|
3607
3708
|
}>;
|
|
3709
|
+
declare const sqlSessionSchema: z.ZodObject<{
|
|
3710
|
+
tenant_id: z.ZodString;
|
|
3711
|
+
device: z.ZodString;
|
|
3712
|
+
clients: z.ZodString;
|
|
3713
|
+
id: z.ZodString;
|
|
3714
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
3715
|
+
client_id: z.ZodString;
|
|
3716
|
+
revoked_at: z.ZodOptional<z.ZodString>;
|
|
3717
|
+
used_at: z.ZodString;
|
|
3718
|
+
user_id: z.ZodString;
|
|
3719
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
3720
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
3721
|
+
created_at: z.ZodString;
|
|
3722
|
+
updated_at: z.ZodString;
|
|
3723
|
+
authenticated_at: z.ZodString;
|
|
3724
|
+
last_interaction_at: z.ZodString;
|
|
3725
|
+
}, "strip", z.ZodTypeAny, {
|
|
3726
|
+
tenant_id: string;
|
|
3727
|
+
id: string;
|
|
3728
|
+
created_at: string;
|
|
3729
|
+
updated_at: string;
|
|
3730
|
+
user_id: string;
|
|
3731
|
+
device: string;
|
|
3732
|
+
clients: string;
|
|
3733
|
+
client_id: string;
|
|
3734
|
+
used_at: string;
|
|
3735
|
+
authenticated_at: string;
|
|
3736
|
+
last_interaction_at: string;
|
|
3737
|
+
session_id?: string | undefined;
|
|
3738
|
+
revoked_at?: string | undefined;
|
|
3739
|
+
expires_at?: string | undefined;
|
|
3740
|
+
idle_expires_at?: string | undefined;
|
|
3741
|
+
}, {
|
|
3742
|
+
tenant_id: string;
|
|
3743
|
+
id: string;
|
|
3744
|
+
created_at: string;
|
|
3745
|
+
updated_at: string;
|
|
3746
|
+
user_id: string;
|
|
3747
|
+
device: string;
|
|
3748
|
+
clients: string;
|
|
3749
|
+
client_id: string;
|
|
3750
|
+
used_at: string;
|
|
3751
|
+
authenticated_at: string;
|
|
3752
|
+
last_interaction_at: string;
|
|
3753
|
+
session_id?: string | undefined;
|
|
3754
|
+
revoked_at?: string | undefined;
|
|
3755
|
+
expires_at?: string | undefined;
|
|
3756
|
+
idle_expires_at?: string | undefined;
|
|
3757
|
+
}>;
|
|
3608
3758
|
export interface Database {
|
|
3609
3759
|
applications: z.infer<typeof sqlApplicationSchema>;
|
|
3610
3760
|
branding: z.infer<typeof sqlBrandingSchema>;
|
|
@@ -3630,9 +3780,7 @@ export interface Database {
|
|
|
3630
3780
|
tenant_id: string;
|
|
3631
3781
|
};
|
|
3632
3782
|
users: z.infer<typeof sqlUserSchema>;
|
|
3633
|
-
sessions:
|
|
3634
|
-
tenant_id: string;
|
|
3635
|
-
};
|
|
3783
|
+
sessions: z.infer<typeof sqlSessionSchema>;
|
|
3636
3784
|
tenants: Tenant;
|
|
3637
3785
|
themes: z.infer<typeof sqlThemeSchema>;
|
|
3638
3786
|
}
|