@authhero/kysely-adapter 5.1.0 → 7.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 +210 -35
- package/dist/kysely-adapter.mjs +756 -712
- package/package.json +2 -2
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -722,6 +722,7 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
722
722
|
email_service?: string | undefined;
|
|
723
723
|
}>, "many">;
|
|
724
724
|
tenant: z.ZodObject<{
|
|
725
|
+
id: z.ZodString;
|
|
725
726
|
name: z.ZodString;
|
|
726
727
|
audience: z.ZodString;
|
|
727
728
|
sender_email: z.ZodString;
|
|
@@ -733,7 +734,6 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
733
734
|
language: z.ZodOptional<z.ZodString>;
|
|
734
735
|
created_at: z.ZodEffects<z.ZodString, string, string>;
|
|
735
736
|
updated_at: z.ZodEffects<z.ZodString, string, string>;
|
|
736
|
-
id: z.ZodString;
|
|
737
737
|
}, "strip", z.ZodTypeAny, {
|
|
738
738
|
created_at: string;
|
|
739
739
|
updated_at: string;
|
|
@@ -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,23 +2122,49 @@ 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
|
-
|
|
2025
|
-
id:
|
|
2127
|
+
declare const tenantSchema: z.ZodObject<{
|
|
2128
|
+
id: z.ZodString;
|
|
2129
|
+
name: z.ZodString;
|
|
2130
|
+
audience: z.ZodString;
|
|
2131
|
+
sender_email: z.ZodString;
|
|
2132
|
+
sender_name: z.ZodString;
|
|
2133
|
+
support_url: z.ZodOptional<z.ZodString>;
|
|
2134
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
2135
|
+
primary_color: z.ZodOptional<z.ZodString>;
|
|
2136
|
+
secondary_color: z.ZodOptional<z.ZodString>;
|
|
2137
|
+
language: z.ZodOptional<z.ZodString>;
|
|
2138
|
+
created_at: z.ZodEffects<z.ZodString, string, string>;
|
|
2139
|
+
updated_at: z.ZodEffects<z.ZodString, string, string>;
|
|
2140
|
+
}, "strip", z.ZodTypeAny, {
|
|
2141
|
+
created_at: string;
|
|
2142
|
+
updated_at: string;
|
|
2026
2143
|
name: string;
|
|
2027
2144
|
audience: string;
|
|
2145
|
+
id: string;
|
|
2028
2146
|
sender_email: string;
|
|
2029
2147
|
sender_name: string;
|
|
2030
|
-
support_url?: string;
|
|
2031
|
-
logo?: string;
|
|
2032
|
-
primary_color?: string;
|
|
2033
|
-
secondary_color?: string;
|
|
2034
|
-
language?: string;
|
|
2148
|
+
support_url?: string | undefined;
|
|
2149
|
+
logo?: string | undefined;
|
|
2150
|
+
primary_color?: string | undefined;
|
|
2151
|
+
secondary_color?: string | undefined;
|
|
2152
|
+
language?: string | undefined;
|
|
2153
|
+
}, {
|
|
2035
2154
|
created_at: string;
|
|
2036
2155
|
updated_at: string;
|
|
2037
|
-
|
|
2156
|
+
name: string;
|
|
2157
|
+
audience: string;
|
|
2158
|
+
id: string;
|
|
2159
|
+
sender_email: string;
|
|
2160
|
+
sender_name: string;
|
|
2161
|
+
support_url?: string | undefined;
|
|
2162
|
+
logo?: string | undefined;
|
|
2163
|
+
primary_color?: string | undefined;
|
|
2164
|
+
secondary_color?: string | undefined;
|
|
2165
|
+
language?: string | undefined;
|
|
2166
|
+
}>;
|
|
2167
|
+
export type Tenant = z.infer<typeof tenantSchema>;
|
|
2038
2168
|
declare const themeInsertSchema: z.ZodObject<{
|
|
2039
2169
|
borders: z.ZodObject<{
|
|
2040
2170
|
button_border_radius: z.ZodNumber;
|
|
@@ -3082,9 +3212,7 @@ export interface SessionsAdapter {
|
|
|
3082
3212
|
create: (tenant_id: string, session: SessionInsert) => Promise<Session>;
|
|
3083
3213
|
get: (tenant_id: string, id: string) => Promise<Session | null>;
|
|
3084
3214
|
list(tenantId: string, params?: ListParams): Promise<ListSesssionsResponse>;
|
|
3085
|
-
update: (tenant_id: string, id: string, session:
|
|
3086
|
-
used_at: string;
|
|
3087
|
-
}) => Promise<boolean>;
|
|
3215
|
+
update: (tenant_id: string, id: string, session: Partial<Session>) => Promise<boolean>;
|
|
3088
3216
|
remove: (tenant_id: string, id: string) => Promise<boolean>;
|
|
3089
3217
|
}
|
|
3090
3218
|
export interface CreateTenantParams {
|
|
@@ -3605,6 +3733,55 @@ declare const sqlEmailProvidersSchema: z.ZodObject<{
|
|
|
3605
3733
|
settings: string;
|
|
3606
3734
|
default_from_address?: string | undefined;
|
|
3607
3735
|
}>;
|
|
3736
|
+
declare const sqlSessionSchema: z.ZodObject<{
|
|
3737
|
+
tenant_id: z.ZodString;
|
|
3738
|
+
device: z.ZodString;
|
|
3739
|
+
clients: z.ZodString;
|
|
3740
|
+
id: z.ZodString;
|
|
3741
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
3742
|
+
client_id: z.ZodString;
|
|
3743
|
+
revoked_at: z.ZodOptional<z.ZodString>;
|
|
3744
|
+
used_at: z.ZodString;
|
|
3745
|
+
user_id: z.ZodString;
|
|
3746
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
3747
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
3748
|
+
created_at: z.ZodString;
|
|
3749
|
+
updated_at: z.ZodString;
|
|
3750
|
+
authenticated_at: z.ZodString;
|
|
3751
|
+
last_interaction_at: z.ZodString;
|
|
3752
|
+
}, "strip", z.ZodTypeAny, {
|
|
3753
|
+
tenant_id: string;
|
|
3754
|
+
id: string;
|
|
3755
|
+
created_at: string;
|
|
3756
|
+
updated_at: string;
|
|
3757
|
+
user_id: string;
|
|
3758
|
+
device: string;
|
|
3759
|
+
clients: string;
|
|
3760
|
+
client_id: string;
|
|
3761
|
+
used_at: string;
|
|
3762
|
+
authenticated_at: string;
|
|
3763
|
+
last_interaction_at: string;
|
|
3764
|
+
session_id?: string | undefined;
|
|
3765
|
+
revoked_at?: string | undefined;
|
|
3766
|
+
expires_at?: string | undefined;
|
|
3767
|
+
idle_expires_at?: string | undefined;
|
|
3768
|
+
}, {
|
|
3769
|
+
tenant_id: string;
|
|
3770
|
+
id: string;
|
|
3771
|
+
created_at: string;
|
|
3772
|
+
updated_at: string;
|
|
3773
|
+
user_id: string;
|
|
3774
|
+
device: string;
|
|
3775
|
+
clients: string;
|
|
3776
|
+
client_id: string;
|
|
3777
|
+
used_at: string;
|
|
3778
|
+
authenticated_at: string;
|
|
3779
|
+
last_interaction_at: string;
|
|
3780
|
+
session_id?: string | undefined;
|
|
3781
|
+
revoked_at?: string | undefined;
|
|
3782
|
+
expires_at?: string | undefined;
|
|
3783
|
+
idle_expires_at?: string | undefined;
|
|
3784
|
+
}>;
|
|
3608
3785
|
export interface Database {
|
|
3609
3786
|
applications: z.infer<typeof sqlApplicationSchema>;
|
|
3610
3787
|
branding: z.infer<typeof sqlBrandingSchema>;
|
|
@@ -3630,9 +3807,7 @@ export interface Database {
|
|
|
3630
3807
|
tenant_id: string;
|
|
3631
3808
|
};
|
|
3632
3809
|
users: z.infer<typeof sqlUserSchema>;
|
|
3633
|
-
sessions:
|
|
3634
|
-
tenant_id: string;
|
|
3635
|
-
};
|
|
3810
|
+
sessions: z.infer<typeof sqlSessionSchema>;
|
|
3636
3811
|
tenants: Tenant;
|
|
3637
3812
|
themes: z.infer<typeof sqlThemeSchema>;
|
|
3638
3813
|
}
|