@authhero/kysely-adapter 7.0.0 → 8.1.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 +195 -57
- package/dist/kysely-adapter.mjs +902 -876
- package/package.json +2 -2
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -1933,8 +1933,6 @@ declare const passwordSchema: z.ZodObject<{
|
|
|
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>;
|
|
1937
|
-
client_id: z.ZodString;
|
|
1938
1936
|
revoked_at: z.ZodOptional<z.ZodString>;
|
|
1939
1937
|
used_at: z.ZodString;
|
|
1940
1938
|
user_id: z.ZodString;
|
|
@@ -1966,7 +1964,6 @@ declare const sessionInsertSchema: z.ZodObject<{
|
|
|
1966
1964
|
}, "strip", z.ZodTypeAny, {
|
|
1967
1965
|
user_id: string;
|
|
1968
1966
|
id: string;
|
|
1969
|
-
client_id: string;
|
|
1970
1967
|
used_at: string;
|
|
1971
1968
|
device: {
|
|
1972
1969
|
last_ip: string;
|
|
@@ -1978,13 +1975,11 @@ declare const sessionInsertSchema: z.ZodObject<{
|
|
|
1978
1975
|
};
|
|
1979
1976
|
clients: string[];
|
|
1980
1977
|
expires_at?: string | undefined;
|
|
1981
|
-
session_id?: string | undefined;
|
|
1982
1978
|
revoked_at?: string | undefined;
|
|
1983
1979
|
idle_expires_at?: string | undefined;
|
|
1984
1980
|
}, {
|
|
1985
1981
|
user_id: string;
|
|
1986
1982
|
id: string;
|
|
1987
|
-
client_id: string;
|
|
1988
1983
|
used_at: string;
|
|
1989
1984
|
device: {
|
|
1990
1985
|
last_ip: string;
|
|
@@ -1996,15 +1991,12 @@ declare const sessionInsertSchema: z.ZodObject<{
|
|
|
1996
1991
|
};
|
|
1997
1992
|
clients: string[];
|
|
1998
1993
|
expires_at?: string | undefined;
|
|
1999
|
-
session_id?: string | undefined;
|
|
2000
1994
|
revoked_at?: string | undefined;
|
|
2001
1995
|
idle_expires_at?: string | undefined;
|
|
2002
1996
|
}>;
|
|
2003
1997
|
export type SessionInsert = z.infer<typeof sessionInsertSchema>;
|
|
2004
1998
|
declare const sessionSchema: z.ZodObject<{
|
|
2005
1999
|
id: z.ZodString;
|
|
2006
|
-
session_id: z.ZodOptional<z.ZodString>;
|
|
2007
|
-
client_id: z.ZodString;
|
|
2008
2000
|
revoked_at: z.ZodOptional<z.ZodString>;
|
|
2009
2001
|
used_at: z.ZodString;
|
|
2010
2002
|
user_id: z.ZodString;
|
|
@@ -2042,7 +2034,6 @@ declare const sessionSchema: z.ZodObject<{
|
|
|
2042
2034
|
updated_at: string;
|
|
2043
2035
|
user_id: string;
|
|
2044
2036
|
id: string;
|
|
2045
|
-
client_id: string;
|
|
2046
2037
|
used_at: string;
|
|
2047
2038
|
device: {
|
|
2048
2039
|
last_ip: string;
|
|
@@ -2056,7 +2047,6 @@ declare const sessionSchema: z.ZodObject<{
|
|
|
2056
2047
|
authenticated_at: string;
|
|
2057
2048
|
last_interaction_at: string;
|
|
2058
2049
|
expires_at?: string | undefined;
|
|
2059
|
-
session_id?: string | undefined;
|
|
2060
2050
|
revoked_at?: string | undefined;
|
|
2061
2051
|
idle_expires_at?: string | undefined;
|
|
2062
2052
|
}, {
|
|
@@ -2064,7 +2054,6 @@ declare const sessionSchema: z.ZodObject<{
|
|
|
2064
2054
|
updated_at: string;
|
|
2065
2055
|
user_id: string;
|
|
2066
2056
|
id: string;
|
|
2067
|
-
client_id: string;
|
|
2068
2057
|
used_at: string;
|
|
2069
2058
|
device: {
|
|
2070
2059
|
last_ip: string;
|
|
@@ -2078,7 +2067,6 @@ declare const sessionSchema: z.ZodObject<{
|
|
|
2078
2067
|
authenticated_at: string;
|
|
2079
2068
|
last_interaction_at: string;
|
|
2080
2069
|
expires_at?: string | undefined;
|
|
2081
|
-
session_id?: string | undefined;
|
|
2082
2070
|
revoked_at?: string | undefined;
|
|
2083
2071
|
idle_expires_at?: string | undefined;
|
|
2084
2072
|
}>;
|
|
@@ -3136,58 +3124,176 @@ declare const emailProviderSchema: z.ZodObject<{
|
|
|
3136
3124
|
}>;
|
|
3137
3125
|
export type EmailProvider = z.infer<typeof emailProviderSchema>;
|
|
3138
3126
|
declare const refreshTokenInsertSchema: z.ZodObject<{
|
|
3139
|
-
|
|
3127
|
+
id: z.ZodString;
|
|
3140
3128
|
session_id: z.ZodString;
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
expires_at: z.ZodString
|
|
3144
|
-
|
|
3145
|
-
|
|
3129
|
+
user_id: z.ZodString;
|
|
3130
|
+
client_id: z.ZodString;
|
|
3131
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
3132
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
3133
|
+
last_exchanged_at: z.ZodOptional<z.ZodString>;
|
|
3134
|
+
device: z.ZodObject<{
|
|
3135
|
+
initial_user_agent: z.ZodString;
|
|
3136
|
+
initial_ip: z.ZodString;
|
|
3137
|
+
initial_asn: z.ZodString;
|
|
3138
|
+
last_user_agent: z.ZodString;
|
|
3139
|
+
last_ip: z.ZodString;
|
|
3140
|
+
last_asn: z.ZodString;
|
|
3141
|
+
}, "strip", z.ZodTypeAny, {
|
|
3142
|
+
last_ip: string;
|
|
3143
|
+
initial_user_agent: string;
|
|
3144
|
+
initial_ip: string;
|
|
3145
|
+
initial_asn: string;
|
|
3146
|
+
last_user_agent: string;
|
|
3147
|
+
last_asn: string;
|
|
3148
|
+
}, {
|
|
3149
|
+
last_ip: string;
|
|
3150
|
+
initial_user_agent: string;
|
|
3151
|
+
initial_ip: string;
|
|
3152
|
+
initial_asn: string;
|
|
3153
|
+
last_user_agent: string;
|
|
3154
|
+
last_asn: string;
|
|
3155
|
+
}>;
|
|
3156
|
+
resource_servers: z.ZodArray<z.ZodObject<{
|
|
3157
|
+
audience: z.ZodString;
|
|
3158
|
+
scopes: z.ZodString;
|
|
3159
|
+
}, "strip", z.ZodTypeAny, {
|
|
3160
|
+
audience: string;
|
|
3161
|
+
scopes: string;
|
|
3162
|
+
}, {
|
|
3163
|
+
audience: string;
|
|
3164
|
+
scopes: string;
|
|
3165
|
+
}>, "many">;
|
|
3166
|
+
rotating: z.ZodBoolean;
|
|
3146
3167
|
}, "strip", z.ZodTypeAny, {
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3168
|
+
user_id: string;
|
|
3169
|
+
id: string;
|
|
3170
|
+
client_id: string;
|
|
3171
|
+
device: {
|
|
3172
|
+
last_ip: string;
|
|
3173
|
+
initial_user_agent: string;
|
|
3174
|
+
initial_ip: string;
|
|
3175
|
+
initial_asn: string;
|
|
3176
|
+
last_user_agent: string;
|
|
3177
|
+
last_asn: string;
|
|
3178
|
+
};
|
|
3151
3179
|
session_id: string;
|
|
3152
|
-
|
|
3153
|
-
|
|
3180
|
+
resource_servers: {
|
|
3181
|
+
audience: string;
|
|
3182
|
+
scopes: string;
|
|
3183
|
+
}[];
|
|
3184
|
+
rotating: boolean;
|
|
3185
|
+
expires_at?: string | undefined;
|
|
3186
|
+
idle_expires_at?: string | undefined;
|
|
3187
|
+
last_exchanged_at?: string | undefined;
|
|
3154
3188
|
}, {
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3189
|
+
user_id: string;
|
|
3190
|
+
id: string;
|
|
3191
|
+
client_id: string;
|
|
3192
|
+
device: {
|
|
3193
|
+
last_ip: string;
|
|
3194
|
+
initial_user_agent: string;
|
|
3195
|
+
initial_ip: string;
|
|
3196
|
+
initial_asn: string;
|
|
3197
|
+
last_user_agent: string;
|
|
3198
|
+
last_asn: string;
|
|
3199
|
+
};
|
|
3159
3200
|
session_id: string;
|
|
3160
|
-
|
|
3161
|
-
|
|
3201
|
+
resource_servers: {
|
|
3202
|
+
audience: string;
|
|
3203
|
+
scopes: string;
|
|
3204
|
+
}[];
|
|
3205
|
+
rotating: boolean;
|
|
3206
|
+
expires_at?: string | undefined;
|
|
3207
|
+
idle_expires_at?: string | undefined;
|
|
3208
|
+
last_exchanged_at?: string | undefined;
|
|
3162
3209
|
}>;
|
|
3163
3210
|
export type RefreshTokenInsert = z.infer<typeof refreshTokenInsertSchema>;
|
|
3164
3211
|
declare const refreshTokenSchema: z.ZodObject<{
|
|
3165
|
-
|
|
3212
|
+
id: z.ZodString;
|
|
3166
3213
|
session_id: z.ZodString;
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
expires_at: z.ZodString
|
|
3170
|
-
|
|
3171
|
-
|
|
3214
|
+
user_id: z.ZodString;
|
|
3215
|
+
client_id: z.ZodString;
|
|
3216
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
3217
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
3218
|
+
last_exchanged_at: z.ZodOptional<z.ZodString>;
|
|
3219
|
+
device: z.ZodObject<{
|
|
3220
|
+
initial_user_agent: z.ZodString;
|
|
3221
|
+
initial_ip: z.ZodString;
|
|
3222
|
+
initial_asn: z.ZodString;
|
|
3223
|
+
last_user_agent: z.ZodString;
|
|
3224
|
+
last_ip: z.ZodString;
|
|
3225
|
+
last_asn: z.ZodString;
|
|
3226
|
+
}, "strip", z.ZodTypeAny, {
|
|
3227
|
+
last_ip: string;
|
|
3228
|
+
initial_user_agent: string;
|
|
3229
|
+
initial_ip: string;
|
|
3230
|
+
initial_asn: string;
|
|
3231
|
+
last_user_agent: string;
|
|
3232
|
+
last_asn: string;
|
|
3233
|
+
}, {
|
|
3234
|
+
last_ip: string;
|
|
3235
|
+
initial_user_agent: string;
|
|
3236
|
+
initial_ip: string;
|
|
3237
|
+
initial_asn: string;
|
|
3238
|
+
last_user_agent: string;
|
|
3239
|
+
last_asn: string;
|
|
3240
|
+
}>;
|
|
3241
|
+
resource_servers: z.ZodArray<z.ZodObject<{
|
|
3242
|
+
audience: z.ZodString;
|
|
3243
|
+
scopes: z.ZodString;
|
|
3244
|
+
}, "strip", z.ZodTypeAny, {
|
|
3245
|
+
audience: string;
|
|
3246
|
+
scopes: string;
|
|
3247
|
+
}, {
|
|
3248
|
+
audience: string;
|
|
3249
|
+
scopes: string;
|
|
3250
|
+
}>, "many">;
|
|
3251
|
+
rotating: z.ZodBoolean;
|
|
3172
3252
|
created_at: z.ZodString;
|
|
3173
3253
|
}, "strip", z.ZodTypeAny, {
|
|
3174
3254
|
created_at: string;
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3255
|
+
user_id: string;
|
|
3256
|
+
id: string;
|
|
3257
|
+
client_id: string;
|
|
3258
|
+
device: {
|
|
3259
|
+
last_ip: string;
|
|
3260
|
+
initial_user_agent: string;
|
|
3261
|
+
initial_ip: string;
|
|
3262
|
+
initial_asn: string;
|
|
3263
|
+
last_user_agent: string;
|
|
3264
|
+
last_asn: string;
|
|
3265
|
+
};
|
|
3179
3266
|
session_id: string;
|
|
3180
|
-
|
|
3181
|
-
|
|
3267
|
+
resource_servers: {
|
|
3268
|
+
audience: string;
|
|
3269
|
+
scopes: string;
|
|
3270
|
+
}[];
|
|
3271
|
+
rotating: boolean;
|
|
3272
|
+
expires_at?: string | undefined;
|
|
3273
|
+
idle_expires_at?: string | undefined;
|
|
3274
|
+
last_exchanged_at?: string | undefined;
|
|
3182
3275
|
}, {
|
|
3183
3276
|
created_at: string;
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3277
|
+
user_id: string;
|
|
3278
|
+
id: string;
|
|
3279
|
+
client_id: string;
|
|
3280
|
+
device: {
|
|
3281
|
+
last_ip: string;
|
|
3282
|
+
initial_user_agent: string;
|
|
3283
|
+
initial_ip: string;
|
|
3284
|
+
initial_asn: string;
|
|
3285
|
+
last_user_agent: string;
|
|
3286
|
+
last_asn: string;
|
|
3287
|
+
};
|
|
3188
3288
|
session_id: string;
|
|
3189
|
-
|
|
3190
|
-
|
|
3289
|
+
resource_servers: {
|
|
3290
|
+
audience: string;
|
|
3291
|
+
scopes: string;
|
|
3292
|
+
}[];
|
|
3293
|
+
rotating: boolean;
|
|
3294
|
+
expires_at?: string | undefined;
|
|
3295
|
+
idle_expires_at?: string | undefined;
|
|
3296
|
+
last_exchanged_at?: string | undefined;
|
|
3191
3297
|
}>;
|
|
3192
3298
|
export type RefreshToken = z.infer<typeof refreshTokenSchema>;
|
|
3193
3299
|
export interface ListCodesResponse extends Totals {
|
|
@@ -3738,8 +3844,6 @@ declare const sqlSessionSchema: z.ZodObject<{
|
|
|
3738
3844
|
device: z.ZodString;
|
|
3739
3845
|
clients: z.ZodString;
|
|
3740
3846
|
id: z.ZodString;
|
|
3741
|
-
session_id: z.ZodOptional<z.ZodString>;
|
|
3742
|
-
client_id: z.ZodString;
|
|
3743
3847
|
revoked_at: z.ZodOptional<z.ZodString>;
|
|
3744
3848
|
used_at: z.ZodString;
|
|
3745
3849
|
user_id: z.ZodString;
|
|
@@ -3757,11 +3861,9 @@ declare const sqlSessionSchema: z.ZodObject<{
|
|
|
3757
3861
|
user_id: string;
|
|
3758
3862
|
device: string;
|
|
3759
3863
|
clients: string;
|
|
3760
|
-
client_id: string;
|
|
3761
3864
|
used_at: string;
|
|
3762
3865
|
authenticated_at: string;
|
|
3763
3866
|
last_interaction_at: string;
|
|
3764
|
-
session_id?: string | undefined;
|
|
3765
3867
|
revoked_at?: string | undefined;
|
|
3766
3868
|
expires_at?: string | undefined;
|
|
3767
3869
|
idle_expires_at?: string | undefined;
|
|
@@ -3773,15 +3875,53 @@ declare const sqlSessionSchema: z.ZodObject<{
|
|
|
3773
3875
|
user_id: string;
|
|
3774
3876
|
device: string;
|
|
3775
3877
|
clients: string;
|
|
3776
|
-
client_id: string;
|
|
3777
3878
|
used_at: string;
|
|
3778
3879
|
authenticated_at: string;
|
|
3779
3880
|
last_interaction_at: string;
|
|
3780
|
-
session_id?: string | undefined;
|
|
3781
3881
|
revoked_at?: string | undefined;
|
|
3782
3882
|
expires_at?: string | undefined;
|
|
3783
3883
|
idle_expires_at?: string | undefined;
|
|
3784
3884
|
}>;
|
|
3885
|
+
declare const sqlRefreshTokensSchema: z.ZodObject<{
|
|
3886
|
+
tenant_id: z.ZodString;
|
|
3887
|
+
device: z.ZodString;
|
|
3888
|
+
resource_servers: z.ZodString;
|
|
3889
|
+
rotating: z.ZodNumber;
|
|
3890
|
+
id: z.ZodString;
|
|
3891
|
+
session_id: z.ZodString;
|
|
3892
|
+
user_id: z.ZodString;
|
|
3893
|
+
client_id: z.ZodString;
|
|
3894
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
3895
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
3896
|
+
last_exchanged_at: z.ZodOptional<z.ZodString>;
|
|
3897
|
+
created_at: z.ZodString;
|
|
3898
|
+
}, "strip", z.ZodTypeAny, {
|
|
3899
|
+
tenant_id: string;
|
|
3900
|
+
id: string;
|
|
3901
|
+
created_at: string;
|
|
3902
|
+
user_id: string;
|
|
3903
|
+
device: string;
|
|
3904
|
+
resource_servers: string;
|
|
3905
|
+
rotating: number;
|
|
3906
|
+
session_id: string;
|
|
3907
|
+
client_id: string;
|
|
3908
|
+
expires_at?: string | undefined;
|
|
3909
|
+
idle_expires_at?: string | undefined;
|
|
3910
|
+
last_exchanged_at?: string | undefined;
|
|
3911
|
+
}, {
|
|
3912
|
+
tenant_id: string;
|
|
3913
|
+
id: string;
|
|
3914
|
+
created_at: string;
|
|
3915
|
+
user_id: string;
|
|
3916
|
+
device: string;
|
|
3917
|
+
resource_servers: string;
|
|
3918
|
+
rotating: number;
|
|
3919
|
+
session_id: string;
|
|
3920
|
+
client_id: string;
|
|
3921
|
+
expires_at?: string | undefined;
|
|
3922
|
+
idle_expires_at?: string | undefined;
|
|
3923
|
+
last_exchanged_at?: string | undefined;
|
|
3924
|
+
}>;
|
|
3785
3925
|
export interface Database {
|
|
3786
3926
|
applications: z.infer<typeof sqlApplicationSchema>;
|
|
3787
3927
|
branding: z.infer<typeof sqlBrandingSchema>;
|
|
@@ -3803,9 +3943,7 @@ export interface Database {
|
|
|
3803
3943
|
tenant_id: string;
|
|
3804
3944
|
};
|
|
3805
3945
|
prompt_settings: z.infer<typeof sqlPromptSettingSchema>;
|
|
3806
|
-
refresh_tokens:
|
|
3807
|
-
tenant_id: string;
|
|
3808
|
-
};
|
|
3946
|
+
refresh_tokens: z.infer<typeof sqlRefreshTokensSchema>;
|
|
3809
3947
|
users: z.infer<typeof sqlUserSchema>;
|
|
3810
3948
|
sessions: z.infer<typeof sqlSessionSchema>;
|
|
3811
3949
|
tenants: Tenant;
|