@authhero/kysely-adapter 6.0.0 → 8.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 +216 -51
- package/dist/kysely-adapter.mjs +349 -297
- 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;
|
|
@@ -1933,7 +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
1936
|
client_id: z.ZodString;
|
|
1938
1937
|
revoked_at: z.ZodOptional<z.ZodString>;
|
|
1939
1938
|
used_at: z.ZodString;
|
|
@@ -1978,7 +1977,6 @@ declare const sessionInsertSchema: z.ZodObject<{
|
|
|
1978
1977
|
};
|
|
1979
1978
|
clients: string[];
|
|
1980
1979
|
expires_at?: string | undefined;
|
|
1981
|
-
session_id?: string | undefined;
|
|
1982
1980
|
revoked_at?: string | undefined;
|
|
1983
1981
|
idle_expires_at?: string | undefined;
|
|
1984
1982
|
}, {
|
|
@@ -1996,14 +1994,12 @@ declare const sessionInsertSchema: z.ZodObject<{
|
|
|
1996
1994
|
};
|
|
1997
1995
|
clients: string[];
|
|
1998
1996
|
expires_at?: string | undefined;
|
|
1999
|
-
session_id?: string | undefined;
|
|
2000
1997
|
revoked_at?: string | undefined;
|
|
2001
1998
|
idle_expires_at?: string | undefined;
|
|
2002
1999
|
}>;
|
|
2003
2000
|
export type SessionInsert = z.infer<typeof sessionInsertSchema>;
|
|
2004
2001
|
declare const sessionSchema: z.ZodObject<{
|
|
2005
2002
|
id: z.ZodString;
|
|
2006
|
-
session_id: z.ZodOptional<z.ZodString>;
|
|
2007
2003
|
client_id: z.ZodString;
|
|
2008
2004
|
revoked_at: z.ZodOptional<z.ZodString>;
|
|
2009
2005
|
used_at: z.ZodString;
|
|
@@ -2056,7 +2052,6 @@ declare const sessionSchema: z.ZodObject<{
|
|
|
2056
2052
|
authenticated_at: string;
|
|
2057
2053
|
last_interaction_at: string;
|
|
2058
2054
|
expires_at?: string | undefined;
|
|
2059
|
-
session_id?: string | undefined;
|
|
2060
2055
|
revoked_at?: string | undefined;
|
|
2061
2056
|
idle_expires_at?: string | undefined;
|
|
2062
2057
|
}, {
|
|
@@ -2078,7 +2073,6 @@ declare const sessionSchema: z.ZodObject<{
|
|
|
2078
2073
|
authenticated_at: string;
|
|
2079
2074
|
last_interaction_at: string;
|
|
2080
2075
|
expires_at?: string | undefined;
|
|
2081
|
-
session_id?: string | undefined;
|
|
2082
2076
|
revoked_at?: string | undefined;
|
|
2083
2077
|
idle_expires_at?: string | undefined;
|
|
2084
2078
|
}>;
|
|
@@ -2124,20 +2118,47 @@ declare const signingKeySchema: z.ZodObject<{
|
|
|
2124
2118
|
revoked?: boolean | undefined;
|
|
2125
2119
|
}>;
|
|
2126
2120
|
export type SigningKey = z.infer<typeof signingKeySchema>;
|
|
2127
|
-
|
|
2128
|
-
id:
|
|
2121
|
+
declare const tenantSchema: z.ZodObject<{
|
|
2122
|
+
id: z.ZodString;
|
|
2123
|
+
name: z.ZodString;
|
|
2124
|
+
audience: z.ZodString;
|
|
2125
|
+
sender_email: z.ZodString;
|
|
2126
|
+
sender_name: z.ZodString;
|
|
2127
|
+
support_url: z.ZodOptional<z.ZodString>;
|
|
2128
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
2129
|
+
primary_color: z.ZodOptional<z.ZodString>;
|
|
2130
|
+
secondary_color: z.ZodOptional<z.ZodString>;
|
|
2131
|
+
language: z.ZodOptional<z.ZodString>;
|
|
2132
|
+
created_at: z.ZodEffects<z.ZodString, string, string>;
|
|
2133
|
+
updated_at: z.ZodEffects<z.ZodString, string, string>;
|
|
2134
|
+
}, "strip", z.ZodTypeAny, {
|
|
2135
|
+
created_at: string;
|
|
2136
|
+
updated_at: string;
|
|
2129
2137
|
name: string;
|
|
2130
2138
|
audience: string;
|
|
2139
|
+
id: string;
|
|
2131
2140
|
sender_email: string;
|
|
2132
2141
|
sender_name: string;
|
|
2133
|
-
support_url?: string;
|
|
2134
|
-
logo?: string;
|
|
2135
|
-
primary_color?: string;
|
|
2136
|
-
secondary_color?: string;
|
|
2137
|
-
language?: string;
|
|
2142
|
+
support_url?: string | undefined;
|
|
2143
|
+
logo?: string | undefined;
|
|
2144
|
+
primary_color?: string | undefined;
|
|
2145
|
+
secondary_color?: string | undefined;
|
|
2146
|
+
language?: string | undefined;
|
|
2147
|
+
}, {
|
|
2138
2148
|
created_at: string;
|
|
2139
2149
|
updated_at: string;
|
|
2140
|
-
|
|
2150
|
+
name: string;
|
|
2151
|
+
audience: string;
|
|
2152
|
+
id: string;
|
|
2153
|
+
sender_email: string;
|
|
2154
|
+
sender_name: string;
|
|
2155
|
+
support_url?: string | undefined;
|
|
2156
|
+
logo?: string | undefined;
|
|
2157
|
+
primary_color?: string | undefined;
|
|
2158
|
+
secondary_color?: string | undefined;
|
|
2159
|
+
language?: string | undefined;
|
|
2160
|
+
}>;
|
|
2161
|
+
export type Tenant = z.infer<typeof tenantSchema>;
|
|
2141
2162
|
declare const themeInsertSchema: z.ZodObject<{
|
|
2142
2163
|
borders: z.ZodObject<{
|
|
2143
2164
|
button_border_radius: z.ZodNumber;
|
|
@@ -3111,56 +3132,168 @@ export type EmailProvider = z.infer<typeof emailProviderSchema>;
|
|
|
3111
3132
|
declare const refreshTokenInsertSchema: z.ZodObject<{
|
|
3112
3133
|
token: z.ZodString;
|
|
3113
3134
|
session_id: z.ZodString;
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3135
|
+
user_id: z.ZodString;
|
|
3136
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
3137
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
3138
|
+
last_exchanged_at: z.ZodOptional<z.ZodString>;
|
|
3139
|
+
device: z.ZodOptional<z.ZodObject<{
|
|
3140
|
+
initial_user_agent: z.ZodString;
|
|
3141
|
+
initial_ip: z.ZodString;
|
|
3142
|
+
initial_asn: z.ZodString;
|
|
3143
|
+
last_user_agent: z.ZodString;
|
|
3144
|
+
last_ip: z.ZodString;
|
|
3145
|
+
last_asn: z.ZodString;
|
|
3146
|
+
}, "strip", z.ZodTypeAny, {
|
|
3147
|
+
last_ip: string;
|
|
3148
|
+
initial_user_agent: string;
|
|
3149
|
+
initial_ip: string;
|
|
3150
|
+
initial_asn: string;
|
|
3151
|
+
last_user_agent: string;
|
|
3152
|
+
last_asn: string;
|
|
3153
|
+
}, {
|
|
3154
|
+
last_ip: string;
|
|
3155
|
+
initial_user_agent: string;
|
|
3156
|
+
initial_ip: string;
|
|
3157
|
+
initial_asn: string;
|
|
3158
|
+
last_user_agent: string;
|
|
3159
|
+
last_asn: string;
|
|
3160
|
+
}>>;
|
|
3161
|
+
resource_servers: z.ZodArray<z.ZodObject<{
|
|
3162
|
+
audience: z.ZodString;
|
|
3163
|
+
scopes: z.ZodString;
|
|
3164
|
+
}, "strip", z.ZodTypeAny, {
|
|
3165
|
+
audience: string;
|
|
3166
|
+
scopes: string;
|
|
3167
|
+
}, {
|
|
3168
|
+
audience: string;
|
|
3169
|
+
scopes: string;
|
|
3170
|
+
}>, "many">;
|
|
3171
|
+
rotating: z.ZodBoolean;
|
|
3119
3172
|
}, "strip", z.ZodTypeAny, {
|
|
3120
|
-
|
|
3173
|
+
user_id: string;
|
|
3121
3174
|
token: string;
|
|
3122
|
-
scope: string;
|
|
3123
|
-
expires_at: string;
|
|
3124
3175
|
session_id: string;
|
|
3125
|
-
|
|
3126
|
-
|
|
3176
|
+
resource_servers: {
|
|
3177
|
+
audience: string;
|
|
3178
|
+
scopes: string;
|
|
3179
|
+
}[];
|
|
3180
|
+
rotating: boolean;
|
|
3181
|
+
expires_at?: string | undefined;
|
|
3182
|
+
idle_expires_at?: string | undefined;
|
|
3183
|
+
device?: {
|
|
3184
|
+
last_ip: string;
|
|
3185
|
+
initial_user_agent: string;
|
|
3186
|
+
initial_ip: string;
|
|
3187
|
+
initial_asn: string;
|
|
3188
|
+
last_user_agent: string;
|
|
3189
|
+
last_asn: string;
|
|
3190
|
+
} | undefined;
|
|
3191
|
+
last_exchanged_at?: string | undefined;
|
|
3127
3192
|
}, {
|
|
3128
|
-
|
|
3193
|
+
user_id: string;
|
|
3129
3194
|
token: string;
|
|
3130
|
-
scope: string;
|
|
3131
|
-
expires_at: string;
|
|
3132
3195
|
session_id: string;
|
|
3133
|
-
|
|
3134
|
-
|
|
3196
|
+
resource_servers: {
|
|
3197
|
+
audience: string;
|
|
3198
|
+
scopes: string;
|
|
3199
|
+
}[];
|
|
3200
|
+
rotating: boolean;
|
|
3201
|
+
expires_at?: string | undefined;
|
|
3202
|
+
idle_expires_at?: string | undefined;
|
|
3203
|
+
device?: {
|
|
3204
|
+
last_ip: string;
|
|
3205
|
+
initial_user_agent: string;
|
|
3206
|
+
initial_ip: string;
|
|
3207
|
+
initial_asn: string;
|
|
3208
|
+
last_user_agent: string;
|
|
3209
|
+
last_asn: string;
|
|
3210
|
+
} | undefined;
|
|
3211
|
+
last_exchanged_at?: string | undefined;
|
|
3135
3212
|
}>;
|
|
3136
3213
|
export type RefreshTokenInsert = z.infer<typeof refreshTokenInsertSchema>;
|
|
3137
3214
|
declare const refreshTokenSchema: z.ZodObject<{
|
|
3138
3215
|
token: z.ZodString;
|
|
3139
3216
|
session_id: z.ZodString;
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3217
|
+
user_id: z.ZodString;
|
|
3218
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
3219
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
3220
|
+
last_exchanged_at: z.ZodOptional<z.ZodString>;
|
|
3221
|
+
device: z.ZodOptional<z.ZodObject<{
|
|
3222
|
+
initial_user_agent: z.ZodString;
|
|
3223
|
+
initial_ip: z.ZodString;
|
|
3224
|
+
initial_asn: z.ZodString;
|
|
3225
|
+
last_user_agent: z.ZodString;
|
|
3226
|
+
last_ip: z.ZodString;
|
|
3227
|
+
last_asn: z.ZodString;
|
|
3228
|
+
}, "strip", z.ZodTypeAny, {
|
|
3229
|
+
last_ip: string;
|
|
3230
|
+
initial_user_agent: string;
|
|
3231
|
+
initial_ip: string;
|
|
3232
|
+
initial_asn: string;
|
|
3233
|
+
last_user_agent: string;
|
|
3234
|
+
last_asn: string;
|
|
3235
|
+
}, {
|
|
3236
|
+
last_ip: string;
|
|
3237
|
+
initial_user_agent: string;
|
|
3238
|
+
initial_ip: string;
|
|
3239
|
+
initial_asn: string;
|
|
3240
|
+
last_user_agent: string;
|
|
3241
|
+
last_asn: string;
|
|
3242
|
+
}>>;
|
|
3243
|
+
resource_servers: z.ZodArray<z.ZodObject<{
|
|
3244
|
+
audience: z.ZodString;
|
|
3245
|
+
scopes: z.ZodString;
|
|
3246
|
+
}, "strip", z.ZodTypeAny, {
|
|
3247
|
+
audience: string;
|
|
3248
|
+
scopes: string;
|
|
3249
|
+
}, {
|
|
3250
|
+
audience: string;
|
|
3251
|
+
scopes: string;
|
|
3252
|
+
}>, "many">;
|
|
3253
|
+
rotating: z.ZodBoolean;
|
|
3145
3254
|
created_at: z.ZodString;
|
|
3146
3255
|
}, "strip", z.ZodTypeAny, {
|
|
3147
3256
|
created_at: string;
|
|
3148
|
-
|
|
3257
|
+
user_id: string;
|
|
3149
3258
|
token: string;
|
|
3150
|
-
scope: string;
|
|
3151
|
-
expires_at: string;
|
|
3152
3259
|
session_id: string;
|
|
3153
|
-
|
|
3154
|
-
|
|
3260
|
+
resource_servers: {
|
|
3261
|
+
audience: string;
|
|
3262
|
+
scopes: string;
|
|
3263
|
+
}[];
|
|
3264
|
+
rotating: boolean;
|
|
3265
|
+
expires_at?: string | undefined;
|
|
3266
|
+
idle_expires_at?: string | undefined;
|
|
3267
|
+
device?: {
|
|
3268
|
+
last_ip: string;
|
|
3269
|
+
initial_user_agent: string;
|
|
3270
|
+
initial_ip: string;
|
|
3271
|
+
initial_asn: string;
|
|
3272
|
+
last_user_agent: string;
|
|
3273
|
+
last_asn: string;
|
|
3274
|
+
} | undefined;
|
|
3275
|
+
last_exchanged_at?: string | undefined;
|
|
3155
3276
|
}, {
|
|
3156
3277
|
created_at: string;
|
|
3157
|
-
|
|
3278
|
+
user_id: string;
|
|
3158
3279
|
token: string;
|
|
3159
|
-
scope: string;
|
|
3160
|
-
expires_at: string;
|
|
3161
3280
|
session_id: string;
|
|
3162
|
-
|
|
3163
|
-
|
|
3281
|
+
resource_servers: {
|
|
3282
|
+
audience: string;
|
|
3283
|
+
scopes: string;
|
|
3284
|
+
}[];
|
|
3285
|
+
rotating: boolean;
|
|
3286
|
+
expires_at?: string | undefined;
|
|
3287
|
+
idle_expires_at?: string | undefined;
|
|
3288
|
+
device?: {
|
|
3289
|
+
last_ip: string;
|
|
3290
|
+
initial_user_agent: string;
|
|
3291
|
+
initial_ip: string;
|
|
3292
|
+
initial_asn: string;
|
|
3293
|
+
last_user_agent: string;
|
|
3294
|
+
last_asn: string;
|
|
3295
|
+
} | undefined;
|
|
3296
|
+
last_exchanged_at?: string | undefined;
|
|
3164
3297
|
}>;
|
|
3165
3298
|
export type RefreshToken = z.infer<typeof refreshTokenSchema>;
|
|
3166
3299
|
export interface ListCodesResponse extends Totals {
|
|
@@ -3711,7 +3844,6 @@ declare const sqlSessionSchema: z.ZodObject<{
|
|
|
3711
3844
|
device: z.ZodString;
|
|
3712
3845
|
clients: z.ZodString;
|
|
3713
3846
|
id: z.ZodString;
|
|
3714
|
-
session_id: z.ZodOptional<z.ZodString>;
|
|
3715
3847
|
client_id: z.ZodString;
|
|
3716
3848
|
revoked_at: z.ZodOptional<z.ZodString>;
|
|
3717
3849
|
used_at: z.ZodString;
|
|
@@ -3734,7 +3866,6 @@ declare const sqlSessionSchema: z.ZodObject<{
|
|
|
3734
3866
|
used_at: string;
|
|
3735
3867
|
authenticated_at: string;
|
|
3736
3868
|
last_interaction_at: string;
|
|
3737
|
-
session_id?: string | undefined;
|
|
3738
3869
|
revoked_at?: string | undefined;
|
|
3739
3870
|
expires_at?: string | undefined;
|
|
3740
3871
|
idle_expires_at?: string | undefined;
|
|
@@ -3750,11 +3881,47 @@ declare const sqlSessionSchema: z.ZodObject<{
|
|
|
3750
3881
|
used_at: string;
|
|
3751
3882
|
authenticated_at: string;
|
|
3752
3883
|
last_interaction_at: string;
|
|
3753
|
-
session_id?: string | undefined;
|
|
3754
3884
|
revoked_at?: string | undefined;
|
|
3755
3885
|
expires_at?: string | undefined;
|
|
3756
3886
|
idle_expires_at?: string | undefined;
|
|
3757
3887
|
}>;
|
|
3888
|
+
declare const sqlRefreshTokensSchema: z.ZodObject<{
|
|
3889
|
+
tenant_id: z.ZodString;
|
|
3890
|
+
device: z.ZodString;
|
|
3891
|
+
resource_servers: z.ZodString;
|
|
3892
|
+
rotating: z.ZodNumber;
|
|
3893
|
+
token: z.ZodString;
|
|
3894
|
+
session_id: z.ZodString;
|
|
3895
|
+
user_id: z.ZodString;
|
|
3896
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
3897
|
+
idle_expires_at: z.ZodOptional<z.ZodString>;
|
|
3898
|
+
last_exchanged_at: z.ZodOptional<z.ZodString>;
|
|
3899
|
+
created_at: z.ZodString;
|
|
3900
|
+
}, "strip", z.ZodTypeAny, {
|
|
3901
|
+
tenant_id: string;
|
|
3902
|
+
created_at: string;
|
|
3903
|
+
user_id: string;
|
|
3904
|
+
device: string;
|
|
3905
|
+
resource_servers: string;
|
|
3906
|
+
rotating: number;
|
|
3907
|
+
token: string;
|
|
3908
|
+
session_id: string;
|
|
3909
|
+
expires_at?: string | undefined;
|
|
3910
|
+
idle_expires_at?: string | undefined;
|
|
3911
|
+
last_exchanged_at?: string | undefined;
|
|
3912
|
+
}, {
|
|
3913
|
+
tenant_id: string;
|
|
3914
|
+
created_at: string;
|
|
3915
|
+
user_id: string;
|
|
3916
|
+
device: string;
|
|
3917
|
+
resource_servers: string;
|
|
3918
|
+
rotating: number;
|
|
3919
|
+
token: string;
|
|
3920
|
+
session_id: string;
|
|
3921
|
+
expires_at?: string | undefined;
|
|
3922
|
+
idle_expires_at?: string | undefined;
|
|
3923
|
+
last_exchanged_at?: string | undefined;
|
|
3924
|
+
}>;
|
|
3758
3925
|
export interface Database {
|
|
3759
3926
|
applications: z.infer<typeof sqlApplicationSchema>;
|
|
3760
3927
|
branding: z.infer<typeof sqlBrandingSchema>;
|
|
@@ -3776,9 +3943,7 @@ export interface Database {
|
|
|
3776
3943
|
tenant_id: string;
|
|
3777
3944
|
};
|
|
3778
3945
|
prompt_settings: z.infer<typeof sqlPromptSettingSchema>;
|
|
3779
|
-
refresh_tokens:
|
|
3780
|
-
tenant_id: string;
|
|
3781
|
-
};
|
|
3946
|
+
refresh_tokens: z.infer<typeof sqlRefreshTokensSchema>;
|
|
3782
3947
|
users: z.infer<typeof sqlUserSchema>;
|
|
3783
3948
|
sessions: z.infer<typeof sqlSessionSchema>;
|
|
3784
3949
|
tenants: Tenant;
|