@authhero/kysely-adapter 0.5.0 → 0.5.2

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.
@@ -297,94 +297,6 @@ declare enum CodeChallengeMethod {
297
297
  S265 = "S256",
298
298
  plain = "plain"
299
299
  }
300
- declare const authenticationCodeSchema: z.ZodObject<{
301
- created_at: z.ZodString;
302
- authParams: z.ZodObject<{
303
- client_id: z.ZodString;
304
- vendor_id: z.ZodOptional<z.ZodString>;
305
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
306
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
307
- redirect_uri: z.ZodOptional<z.ZodString>;
308
- audience: z.ZodOptional<z.ZodString>;
309
- state: z.ZodOptional<z.ZodString>;
310
- nonce: z.ZodOptional<z.ZodString>;
311
- scope: z.ZodOptional<z.ZodString>;
312
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
313
- code_challenge: z.ZodOptional<z.ZodString>;
314
- username: z.ZodOptional<z.ZodString>;
315
- }, "strip", z.ZodTypeAny, {
316
- client_id: string;
317
- username?: string | undefined;
318
- vendor_id?: string | undefined;
319
- response_type?: AuthorizationResponseType | undefined;
320
- response_mode?: AuthorizationResponseMode | undefined;
321
- redirect_uri?: string | undefined;
322
- audience?: string | undefined;
323
- state?: string | undefined;
324
- nonce?: string | undefined;
325
- scope?: string | undefined;
326
- code_challenge_method?: CodeChallengeMethod | undefined;
327
- code_challenge?: string | undefined;
328
- }, {
329
- client_id: string;
330
- username?: string | undefined;
331
- vendor_id?: string | undefined;
332
- response_type?: AuthorizationResponseType | undefined;
333
- response_mode?: AuthorizationResponseMode | undefined;
334
- redirect_uri?: string | undefined;
335
- audience?: string | undefined;
336
- state?: string | undefined;
337
- nonce?: string | undefined;
338
- scope?: string | undefined;
339
- code_challenge_method?: CodeChallengeMethod | undefined;
340
- code_challenge?: string | undefined;
341
- }>;
342
- code: z.ZodString;
343
- user_id: z.ZodString;
344
- expires_at: z.ZodString;
345
- used_at: z.ZodOptional<z.ZodString>;
346
- }, "strip", z.ZodTypeAny, {
347
- code: string;
348
- created_at: string;
349
- user_id: string;
350
- authParams: {
351
- client_id: string;
352
- username?: string | undefined;
353
- vendor_id?: string | undefined;
354
- response_type?: AuthorizationResponseType | undefined;
355
- response_mode?: AuthorizationResponseMode | undefined;
356
- redirect_uri?: string | undefined;
357
- audience?: string | undefined;
358
- state?: string | undefined;
359
- nonce?: string | undefined;
360
- scope?: string | undefined;
361
- code_challenge_method?: CodeChallengeMethod | undefined;
362
- code_challenge?: string | undefined;
363
- };
364
- expires_at: string;
365
- used_at?: string | undefined;
366
- }, {
367
- code: string;
368
- created_at: string;
369
- user_id: string;
370
- authParams: {
371
- client_id: string;
372
- username?: string | undefined;
373
- vendor_id?: string | undefined;
374
- response_type?: AuthorizationResponseType | undefined;
375
- response_mode?: AuthorizationResponseMode | undefined;
376
- redirect_uri?: string | undefined;
377
- audience?: string | undefined;
378
- state?: string | undefined;
379
- nonce?: string | undefined;
380
- scope?: string | undefined;
381
- code_challenge_method?: CodeChallengeMethod | undefined;
382
- code_challenge?: string | undefined;
383
- };
384
- expires_at: string;
385
- used_at?: string | undefined;
386
- }>;
387
- export type AuthenticationCode = z.infer<typeof authenticationCodeSchema>;
388
300
  declare const brandingSchema: z.ZodObject<{
389
301
  colors: z.ZodOptional<z.ZodObject<{
390
302
  primary: z.ZodString;
@@ -462,15 +374,45 @@ declare const brandingSchema: z.ZodObject<{
462
374
  } | undefined;
463
375
  }>;
464
376
  export type Branding = z.infer<typeof brandingSchema>;
465
- export interface Code {
466
- id: string;
467
- code: string;
468
- type: "password_reset" | "validation";
377
+ declare const codeTypeSchema: z.ZodEnum<[
378
+ "password_reset",
379
+ "email_verification",
380
+ "otp",
381
+ "oauth2",
382
+ "oauth2_state",
383
+ "ticket"
384
+ ]>;
385
+ export type CodeType = z.infer<typeof codeTypeSchema>;
386
+ declare const codeSchema: z.ZodObject<{
387
+ code_id: z.ZodString;
388
+ login_id: z.ZodString;
389
+ code_type: z.ZodEnum<[
390
+ "password_reset",
391
+ "email_verification",
392
+ "otp",
393
+ "oauth2",
394
+ "oauth2_state",
395
+ "ticket"
396
+ ]>;
397
+ created_at: z.ZodString;
398
+ expires_at: z.ZodString;
399
+ used_at: z.ZodOptional<z.ZodString>;
400
+ }, "strip", z.ZodTypeAny, {
469
401
  created_at: string;
402
+ code_id: string;
403
+ login_id: string;
404
+ code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
470
405
  expires_at: string;
471
- used_at?: string;
472
- user_id: string;
473
- }
406
+ used_at?: string | undefined;
407
+ }, {
408
+ created_at: string;
409
+ code_id: string;
410
+ login_id: string;
411
+ code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
412
+ expires_at: string;
413
+ used_at?: string | undefined;
414
+ }>;
415
+ export type Code = z.infer<typeof codeSchema>;
474
416
  declare const connectionInsertSchema: z.ZodObject<{
475
417
  id: z.ZodOptional<z.ZodString>;
476
418
  name: z.ZodString;
@@ -796,15 +738,1055 @@ export type LogsResponse = Log & {
796
738
  log_id: string;
797
739
  _id: string;
798
740
  };
799
- declare const otpInsertSchema: z.ZodObject<{
741
+ declare const passwordInsertSchema: z.ZodObject<{
742
+ user_id: z.ZodString;
743
+ password: z.ZodString;
744
+ algorithm: z.ZodDefault<z.ZodEnum<[
745
+ "bcrypt",
746
+ "argon2id"
747
+ ]>>;
748
+ }, "strip", z.ZodTypeAny, {
749
+ password: string;
750
+ user_id: string;
751
+ algorithm: "bcrypt" | "argon2id";
752
+ }, {
753
+ password: string;
754
+ user_id: string;
755
+ algorithm?: "bcrypt" | "argon2id" | undefined;
756
+ }>;
757
+ export type PasswordInsert = z.infer<typeof passwordInsertSchema>;
758
+ declare const passwordSchema: z.ZodObject<{
759
+ created_at: z.ZodString;
760
+ updated_at: z.ZodString;
761
+ user_id: z.ZodString;
762
+ password: z.ZodString;
763
+ algorithm: z.ZodDefault<z.ZodEnum<[
764
+ "bcrypt",
765
+ "argon2id"
766
+ ]>>;
767
+ }, "strip", z.ZodTypeAny, {
768
+ password: string;
769
+ created_at: string;
770
+ updated_at: string;
771
+ user_id: string;
772
+ algorithm: "bcrypt" | "argon2id";
773
+ }, {
774
+ password: string;
775
+ created_at: string;
776
+ updated_at: string;
777
+ user_id: string;
778
+ algorithm?: "bcrypt" | "argon2id" | undefined;
779
+ }>;
780
+ export type Password = z.infer<typeof passwordSchema>;
781
+ declare const sessionInsertSchema: z.ZodObject<{
782
+ session_id: z.ZodString;
783
+ client_id: z.ZodString;
784
+ expires_at: z.ZodString;
785
+ used_at: z.ZodString;
786
+ deleted_at: z.ZodOptional<z.ZodString>;
787
+ user_id: z.ZodString;
788
+ }, "strip", z.ZodTypeAny, {
789
+ user_id: string;
790
+ client_id: string;
791
+ expires_at: string;
792
+ used_at: string;
793
+ session_id: string;
794
+ deleted_at?: string | undefined;
795
+ }, {
796
+ user_id: string;
797
+ client_id: string;
798
+ expires_at: string;
799
+ used_at: string;
800
+ session_id: string;
801
+ deleted_at?: string | undefined;
802
+ }>;
803
+ export type SessionInsert = z.infer<typeof sessionInsertSchema>;
804
+ declare const sessionSchema: z.ZodObject<{
805
+ session_id: z.ZodString;
806
+ client_id: z.ZodString;
807
+ expires_at: z.ZodString;
808
+ used_at: z.ZodString;
809
+ deleted_at: z.ZodOptional<z.ZodString>;
810
+ user_id: z.ZodString;
811
+ created_at: z.ZodString;
812
+ }, "strip", z.ZodTypeAny, {
813
+ created_at: string;
814
+ user_id: string;
815
+ client_id: string;
816
+ expires_at: string;
817
+ used_at: string;
818
+ session_id: string;
819
+ deleted_at?: string | undefined;
820
+ }, {
821
+ created_at: string;
822
+ user_id: string;
823
+ client_id: string;
824
+ expires_at: string;
825
+ used_at: string;
826
+ session_id: string;
827
+ deleted_at?: string | undefined;
828
+ }>;
829
+ export type Session = z.infer<typeof sessionSchema>;
830
+ export interface Certificate {
831
+ private_key: string;
832
+ public_key: string;
833
+ kid: string;
834
+ created_at: string;
835
+ revoked_at?: string;
836
+ }
837
+ export interface Tenant {
838
+ id: string;
839
+ name: string;
840
+ audience: string;
841
+ sender_email: string;
842
+ sender_name: string;
843
+ support_url?: string;
844
+ logo?: string;
845
+ primary_color?: string;
846
+ secondary_color?: string;
847
+ language?: string;
848
+ created_at: string;
849
+ updated_at: string;
850
+ }
851
+ declare const themeInsertSchema: z.ZodObject<{
852
+ borders: z.ZodObject<{
853
+ button_border_radius: z.ZodNumber;
854
+ button_border_weight: z.ZodNumber;
855
+ buttons_style: z.ZodEnum<[
856
+ "pill"
857
+ ]>;
858
+ input_border_radius: z.ZodNumber;
859
+ input_border_weight: z.ZodNumber;
860
+ inputs_style: z.ZodEnum<[
861
+ "pill"
862
+ ]>;
863
+ show_widget_shadow: z.ZodBoolean;
864
+ widget_border_weight: z.ZodNumber;
865
+ widget_corner_radius: z.ZodNumber;
866
+ }, "strip", z.ZodTypeAny, {
867
+ button_border_radius: number;
868
+ button_border_weight: number;
869
+ buttons_style: "pill";
870
+ input_border_radius: number;
871
+ input_border_weight: number;
872
+ inputs_style: "pill";
873
+ show_widget_shadow: boolean;
874
+ widget_border_weight: number;
875
+ widget_corner_radius: number;
876
+ }, {
877
+ button_border_radius: number;
878
+ button_border_weight: number;
879
+ buttons_style: "pill";
880
+ input_border_radius: number;
881
+ input_border_weight: number;
882
+ inputs_style: "pill";
883
+ show_widget_shadow: boolean;
884
+ widget_border_weight: number;
885
+ widget_corner_radius: number;
886
+ }>;
887
+ colors: z.ZodObject<{
888
+ base_focus_color: z.ZodString;
889
+ base_hover_color: z.ZodString;
890
+ body_text: z.ZodString;
891
+ captcha_widget_theme: z.ZodEnum<[
892
+ "auto"
893
+ ]>;
894
+ error: z.ZodString;
895
+ header: z.ZodString;
896
+ icons: z.ZodString;
897
+ input_background: z.ZodString;
898
+ input_border: z.ZodString;
899
+ input_filled_text: z.ZodString;
900
+ input_labels_placeholders: z.ZodString;
901
+ links_focused_components: z.ZodString;
902
+ primary_button: z.ZodString;
903
+ primary_button_label: z.ZodString;
904
+ secondary_button_border: z.ZodString;
905
+ secondary_button_label: z.ZodString;
906
+ success: z.ZodString;
907
+ widget_background: z.ZodString;
908
+ widget_border: z.ZodString;
909
+ }, "strip", z.ZodTypeAny, {
910
+ base_focus_color: string;
911
+ base_hover_color: string;
912
+ body_text: string;
913
+ captcha_widget_theme: "auto";
914
+ error: string;
915
+ header: string;
916
+ icons: string;
917
+ input_background: string;
918
+ input_border: string;
919
+ input_filled_text: string;
920
+ input_labels_placeholders: string;
921
+ links_focused_components: string;
922
+ primary_button: string;
923
+ primary_button_label: string;
924
+ secondary_button_border: string;
925
+ secondary_button_label: string;
926
+ success: string;
927
+ widget_background: string;
928
+ widget_border: string;
929
+ }, {
930
+ base_focus_color: string;
931
+ base_hover_color: string;
932
+ body_text: string;
933
+ captcha_widget_theme: "auto";
934
+ error: string;
935
+ header: string;
936
+ icons: string;
937
+ input_background: string;
938
+ input_border: string;
939
+ input_filled_text: string;
940
+ input_labels_placeholders: string;
941
+ links_focused_components: string;
942
+ primary_button: string;
943
+ primary_button_label: string;
944
+ secondary_button_border: string;
945
+ secondary_button_label: string;
946
+ success: string;
947
+ widget_background: string;
948
+ widget_border: string;
949
+ }>;
950
+ displayName: z.ZodString;
951
+ fonts: z.ZodObject<{
952
+ body_text: z.ZodObject<{
953
+ bold: z.ZodBoolean;
954
+ size: z.ZodNumber;
955
+ }, "strip", z.ZodTypeAny, {
956
+ bold: boolean;
957
+ size: number;
958
+ }, {
959
+ bold: boolean;
960
+ size: number;
961
+ }>;
962
+ buttons_text: z.ZodObject<{
963
+ bold: z.ZodBoolean;
964
+ size: z.ZodNumber;
965
+ }, "strip", z.ZodTypeAny, {
966
+ bold: boolean;
967
+ size: number;
968
+ }, {
969
+ bold: boolean;
970
+ size: number;
971
+ }>;
972
+ font_url: z.ZodString;
973
+ input_labels: z.ZodObject<{
974
+ bold: z.ZodBoolean;
975
+ size: z.ZodNumber;
976
+ }, "strip", z.ZodTypeAny, {
977
+ bold: boolean;
978
+ size: number;
979
+ }, {
980
+ bold: boolean;
981
+ size: number;
982
+ }>;
983
+ links: z.ZodObject<{
984
+ bold: z.ZodBoolean;
985
+ size: z.ZodNumber;
986
+ }, "strip", z.ZodTypeAny, {
987
+ bold: boolean;
988
+ size: number;
989
+ }, {
990
+ bold: boolean;
991
+ size: number;
992
+ }>;
993
+ links_style: z.ZodEnum<[
994
+ "normal"
995
+ ]>;
996
+ reference_text_size: z.ZodNumber;
997
+ subtitle: z.ZodObject<{
998
+ bold: z.ZodBoolean;
999
+ size: z.ZodNumber;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ bold: boolean;
1002
+ size: number;
1003
+ }, {
1004
+ bold: boolean;
1005
+ size: number;
1006
+ }>;
1007
+ title: z.ZodObject<{
1008
+ bold: z.ZodBoolean;
1009
+ size: z.ZodNumber;
1010
+ }, "strip", z.ZodTypeAny, {
1011
+ bold: boolean;
1012
+ size: number;
1013
+ }, {
1014
+ bold: boolean;
1015
+ size: number;
1016
+ }>;
1017
+ }, "strip", z.ZodTypeAny, {
1018
+ title: {
1019
+ bold: boolean;
1020
+ size: number;
1021
+ };
1022
+ body_text: {
1023
+ bold: boolean;
1024
+ size: number;
1025
+ };
1026
+ buttons_text: {
1027
+ bold: boolean;
1028
+ size: number;
1029
+ };
1030
+ font_url: string;
1031
+ input_labels: {
1032
+ bold: boolean;
1033
+ size: number;
1034
+ };
1035
+ links: {
1036
+ bold: boolean;
1037
+ size: number;
1038
+ };
1039
+ links_style: "normal";
1040
+ reference_text_size: number;
1041
+ subtitle: {
1042
+ bold: boolean;
1043
+ size: number;
1044
+ };
1045
+ }, {
1046
+ title: {
1047
+ bold: boolean;
1048
+ size: number;
1049
+ };
1050
+ body_text: {
1051
+ bold: boolean;
1052
+ size: number;
1053
+ };
1054
+ buttons_text: {
1055
+ bold: boolean;
1056
+ size: number;
1057
+ };
1058
+ font_url: string;
1059
+ input_labels: {
1060
+ bold: boolean;
1061
+ size: number;
1062
+ };
1063
+ links: {
1064
+ bold: boolean;
1065
+ size: number;
1066
+ };
1067
+ links_style: "normal";
1068
+ reference_text_size: number;
1069
+ subtitle: {
1070
+ bold: boolean;
1071
+ size: number;
1072
+ };
1073
+ }>;
1074
+ page_background: z.ZodObject<{
1075
+ background_color: z.ZodString;
1076
+ background_image_url: z.ZodString;
1077
+ page_layout: z.ZodEnum<[
1078
+ "center"
1079
+ ]>;
1080
+ }, "strip", z.ZodTypeAny, {
1081
+ background_color: string;
1082
+ background_image_url: string;
1083
+ page_layout: "center";
1084
+ }, {
1085
+ background_color: string;
1086
+ background_image_url: string;
1087
+ page_layout: "center";
1088
+ }>;
1089
+ widget: z.ZodObject<{
1090
+ header_text_alignment: z.ZodEnum<[
1091
+ "center"
1092
+ ]>;
1093
+ logo_height: z.ZodNumber;
1094
+ logo_position: z.ZodEnum<[
1095
+ "center"
1096
+ ]>;
1097
+ logo_url: z.ZodString;
1098
+ social_buttons_layout: z.ZodEnum<[
1099
+ "bottom"
1100
+ ]>;
1101
+ }, "strip", z.ZodTypeAny, {
1102
+ logo_url: string;
1103
+ header_text_alignment: "center";
1104
+ logo_height: number;
1105
+ logo_position: "center";
1106
+ social_buttons_layout: "bottom";
1107
+ }, {
1108
+ logo_url: string;
1109
+ header_text_alignment: "center";
1110
+ logo_height: number;
1111
+ logo_position: "center";
1112
+ social_buttons_layout: "bottom";
1113
+ }>;
1114
+ }, "strip", z.ZodTypeAny, {
1115
+ page_background: {
1116
+ background_color: string;
1117
+ background_image_url: string;
1118
+ page_layout: "center";
1119
+ };
1120
+ colors: {
1121
+ base_focus_color: string;
1122
+ base_hover_color: string;
1123
+ body_text: string;
1124
+ captcha_widget_theme: "auto";
1125
+ error: string;
1126
+ header: string;
1127
+ icons: string;
1128
+ input_background: string;
1129
+ input_border: string;
1130
+ input_filled_text: string;
1131
+ input_labels_placeholders: string;
1132
+ links_focused_components: string;
1133
+ primary_button: string;
1134
+ primary_button_label: string;
1135
+ secondary_button_border: string;
1136
+ secondary_button_label: string;
1137
+ success: string;
1138
+ widget_background: string;
1139
+ widget_border: string;
1140
+ };
1141
+ borders: {
1142
+ button_border_radius: number;
1143
+ button_border_weight: number;
1144
+ buttons_style: "pill";
1145
+ input_border_radius: number;
1146
+ input_border_weight: number;
1147
+ inputs_style: "pill";
1148
+ show_widget_shadow: boolean;
1149
+ widget_border_weight: number;
1150
+ widget_corner_radius: number;
1151
+ };
1152
+ displayName: string;
1153
+ fonts: {
1154
+ title: {
1155
+ bold: boolean;
1156
+ size: number;
1157
+ };
1158
+ body_text: {
1159
+ bold: boolean;
1160
+ size: number;
1161
+ };
1162
+ buttons_text: {
1163
+ bold: boolean;
1164
+ size: number;
1165
+ };
1166
+ font_url: string;
1167
+ input_labels: {
1168
+ bold: boolean;
1169
+ size: number;
1170
+ };
1171
+ links: {
1172
+ bold: boolean;
1173
+ size: number;
1174
+ };
1175
+ links_style: "normal";
1176
+ reference_text_size: number;
1177
+ subtitle: {
1178
+ bold: boolean;
1179
+ size: number;
1180
+ };
1181
+ };
1182
+ widget: {
1183
+ logo_url: string;
1184
+ header_text_alignment: "center";
1185
+ logo_height: number;
1186
+ logo_position: "center";
1187
+ social_buttons_layout: "bottom";
1188
+ };
1189
+ }, {
1190
+ page_background: {
1191
+ background_color: string;
1192
+ background_image_url: string;
1193
+ page_layout: "center";
1194
+ };
1195
+ colors: {
1196
+ base_focus_color: string;
1197
+ base_hover_color: string;
1198
+ body_text: string;
1199
+ captcha_widget_theme: "auto";
1200
+ error: string;
1201
+ header: string;
1202
+ icons: string;
1203
+ input_background: string;
1204
+ input_border: string;
1205
+ input_filled_text: string;
1206
+ input_labels_placeholders: string;
1207
+ links_focused_components: string;
1208
+ primary_button: string;
1209
+ primary_button_label: string;
1210
+ secondary_button_border: string;
1211
+ secondary_button_label: string;
1212
+ success: string;
1213
+ widget_background: string;
1214
+ widget_border: string;
1215
+ };
1216
+ borders: {
1217
+ button_border_radius: number;
1218
+ button_border_weight: number;
1219
+ buttons_style: "pill";
1220
+ input_border_radius: number;
1221
+ input_border_weight: number;
1222
+ inputs_style: "pill";
1223
+ show_widget_shadow: boolean;
1224
+ widget_border_weight: number;
1225
+ widget_corner_radius: number;
1226
+ };
1227
+ displayName: string;
1228
+ fonts: {
1229
+ title: {
1230
+ bold: boolean;
1231
+ size: number;
1232
+ };
1233
+ body_text: {
1234
+ bold: boolean;
1235
+ size: number;
1236
+ };
1237
+ buttons_text: {
1238
+ bold: boolean;
1239
+ size: number;
1240
+ };
1241
+ font_url: string;
1242
+ input_labels: {
1243
+ bold: boolean;
1244
+ size: number;
1245
+ };
1246
+ links: {
1247
+ bold: boolean;
1248
+ size: number;
1249
+ };
1250
+ links_style: "normal";
1251
+ reference_text_size: number;
1252
+ subtitle: {
1253
+ bold: boolean;
1254
+ size: number;
1255
+ };
1256
+ };
1257
+ widget: {
1258
+ logo_url: string;
1259
+ header_text_alignment: "center";
1260
+ logo_height: number;
1261
+ logo_position: "center";
1262
+ social_buttons_layout: "bottom";
1263
+ };
1264
+ }>;
1265
+ export type ThemeInsert = z.infer<typeof themeInsertSchema>;
1266
+ declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
1267
+ borders: z.ZodObject<{
1268
+ button_border_radius: z.ZodNumber;
1269
+ button_border_weight: z.ZodNumber;
1270
+ buttons_style: z.ZodEnum<[
1271
+ "pill"
1272
+ ]>;
1273
+ input_border_radius: z.ZodNumber;
1274
+ input_border_weight: z.ZodNumber;
1275
+ inputs_style: z.ZodEnum<[
1276
+ "pill"
1277
+ ]>;
1278
+ show_widget_shadow: z.ZodBoolean;
1279
+ widget_border_weight: z.ZodNumber;
1280
+ widget_corner_radius: z.ZodNumber;
1281
+ }, "strip", z.ZodTypeAny, {
1282
+ button_border_radius: number;
1283
+ button_border_weight: number;
1284
+ buttons_style: "pill";
1285
+ input_border_radius: number;
1286
+ input_border_weight: number;
1287
+ inputs_style: "pill";
1288
+ show_widget_shadow: boolean;
1289
+ widget_border_weight: number;
1290
+ widget_corner_radius: number;
1291
+ }, {
1292
+ button_border_radius: number;
1293
+ button_border_weight: number;
1294
+ buttons_style: "pill";
1295
+ input_border_radius: number;
1296
+ input_border_weight: number;
1297
+ inputs_style: "pill";
1298
+ show_widget_shadow: boolean;
1299
+ widget_border_weight: number;
1300
+ widget_corner_radius: number;
1301
+ }>;
1302
+ colors: z.ZodObject<{
1303
+ base_focus_color: z.ZodString;
1304
+ base_hover_color: z.ZodString;
1305
+ body_text: z.ZodString;
1306
+ captcha_widget_theme: z.ZodEnum<[
1307
+ "auto"
1308
+ ]>;
1309
+ error: z.ZodString;
1310
+ header: z.ZodString;
1311
+ icons: z.ZodString;
1312
+ input_background: z.ZodString;
1313
+ input_border: z.ZodString;
1314
+ input_filled_text: z.ZodString;
1315
+ input_labels_placeholders: z.ZodString;
1316
+ links_focused_components: z.ZodString;
1317
+ primary_button: z.ZodString;
1318
+ primary_button_label: z.ZodString;
1319
+ secondary_button_border: z.ZodString;
1320
+ secondary_button_label: z.ZodString;
1321
+ success: z.ZodString;
1322
+ widget_background: z.ZodString;
1323
+ widget_border: z.ZodString;
1324
+ }, "strip", z.ZodTypeAny, {
1325
+ base_focus_color: string;
1326
+ base_hover_color: string;
1327
+ body_text: string;
1328
+ captcha_widget_theme: "auto";
1329
+ error: string;
1330
+ header: string;
1331
+ icons: string;
1332
+ input_background: string;
1333
+ input_border: string;
1334
+ input_filled_text: string;
1335
+ input_labels_placeholders: string;
1336
+ links_focused_components: string;
1337
+ primary_button: string;
1338
+ primary_button_label: string;
1339
+ secondary_button_border: string;
1340
+ secondary_button_label: string;
1341
+ success: string;
1342
+ widget_background: string;
1343
+ widget_border: string;
1344
+ }, {
1345
+ base_focus_color: string;
1346
+ base_hover_color: string;
1347
+ body_text: string;
1348
+ captcha_widget_theme: "auto";
1349
+ error: string;
1350
+ header: string;
1351
+ icons: string;
1352
+ input_background: string;
1353
+ input_border: string;
1354
+ input_filled_text: string;
1355
+ input_labels_placeholders: string;
1356
+ links_focused_components: string;
1357
+ primary_button: string;
1358
+ primary_button_label: string;
1359
+ secondary_button_border: string;
1360
+ secondary_button_label: string;
1361
+ success: string;
1362
+ widget_background: string;
1363
+ widget_border: string;
1364
+ }>;
1365
+ displayName: z.ZodString;
1366
+ fonts: z.ZodObject<{
1367
+ body_text: z.ZodObject<{
1368
+ bold: z.ZodBoolean;
1369
+ size: z.ZodNumber;
1370
+ }, "strip", z.ZodTypeAny, {
1371
+ bold: boolean;
1372
+ size: number;
1373
+ }, {
1374
+ bold: boolean;
1375
+ size: number;
1376
+ }>;
1377
+ buttons_text: z.ZodObject<{
1378
+ bold: z.ZodBoolean;
1379
+ size: z.ZodNumber;
1380
+ }, "strip", z.ZodTypeAny, {
1381
+ bold: boolean;
1382
+ size: number;
1383
+ }, {
1384
+ bold: boolean;
1385
+ size: number;
1386
+ }>;
1387
+ font_url: z.ZodString;
1388
+ input_labels: z.ZodObject<{
1389
+ bold: z.ZodBoolean;
1390
+ size: z.ZodNumber;
1391
+ }, "strip", z.ZodTypeAny, {
1392
+ bold: boolean;
1393
+ size: number;
1394
+ }, {
1395
+ bold: boolean;
1396
+ size: number;
1397
+ }>;
1398
+ links: z.ZodObject<{
1399
+ bold: z.ZodBoolean;
1400
+ size: z.ZodNumber;
1401
+ }, "strip", z.ZodTypeAny, {
1402
+ bold: boolean;
1403
+ size: number;
1404
+ }, {
1405
+ bold: boolean;
1406
+ size: number;
1407
+ }>;
1408
+ links_style: z.ZodEnum<[
1409
+ "normal"
1410
+ ]>;
1411
+ reference_text_size: z.ZodNumber;
1412
+ subtitle: z.ZodObject<{
1413
+ bold: z.ZodBoolean;
1414
+ size: z.ZodNumber;
1415
+ }, "strip", z.ZodTypeAny, {
1416
+ bold: boolean;
1417
+ size: number;
1418
+ }, {
1419
+ bold: boolean;
1420
+ size: number;
1421
+ }>;
1422
+ title: z.ZodObject<{
1423
+ bold: z.ZodBoolean;
1424
+ size: z.ZodNumber;
1425
+ }, "strip", z.ZodTypeAny, {
1426
+ bold: boolean;
1427
+ size: number;
1428
+ }, {
1429
+ bold: boolean;
1430
+ size: number;
1431
+ }>;
1432
+ }, "strip", z.ZodTypeAny, {
1433
+ title: {
1434
+ bold: boolean;
1435
+ size: number;
1436
+ };
1437
+ body_text: {
1438
+ bold: boolean;
1439
+ size: number;
1440
+ };
1441
+ buttons_text: {
1442
+ bold: boolean;
1443
+ size: number;
1444
+ };
1445
+ font_url: string;
1446
+ input_labels: {
1447
+ bold: boolean;
1448
+ size: number;
1449
+ };
1450
+ links: {
1451
+ bold: boolean;
1452
+ size: number;
1453
+ };
1454
+ links_style: "normal";
1455
+ reference_text_size: number;
1456
+ subtitle: {
1457
+ bold: boolean;
1458
+ size: number;
1459
+ };
1460
+ }, {
1461
+ title: {
1462
+ bold: boolean;
1463
+ size: number;
1464
+ };
1465
+ body_text: {
1466
+ bold: boolean;
1467
+ size: number;
1468
+ };
1469
+ buttons_text: {
1470
+ bold: boolean;
1471
+ size: number;
1472
+ };
1473
+ font_url: string;
1474
+ input_labels: {
1475
+ bold: boolean;
1476
+ size: number;
1477
+ };
1478
+ links: {
1479
+ bold: boolean;
1480
+ size: number;
1481
+ };
1482
+ links_style: "normal";
1483
+ reference_text_size: number;
1484
+ subtitle: {
1485
+ bold: boolean;
1486
+ size: number;
1487
+ };
1488
+ }>;
1489
+ page_background: z.ZodObject<{
1490
+ background_color: z.ZodString;
1491
+ background_image_url: z.ZodString;
1492
+ page_layout: z.ZodEnum<[
1493
+ "center"
1494
+ ]>;
1495
+ }, "strip", z.ZodTypeAny, {
1496
+ background_color: string;
1497
+ background_image_url: string;
1498
+ page_layout: "center";
1499
+ }, {
1500
+ background_color: string;
1501
+ background_image_url: string;
1502
+ page_layout: "center";
1503
+ }>;
1504
+ widget: z.ZodObject<{
1505
+ header_text_alignment: z.ZodEnum<[
1506
+ "center"
1507
+ ]>;
1508
+ logo_height: z.ZodNumber;
1509
+ logo_position: z.ZodEnum<[
1510
+ "center"
1511
+ ]>;
1512
+ logo_url: z.ZodString;
1513
+ social_buttons_layout: z.ZodEnum<[
1514
+ "bottom"
1515
+ ]>;
1516
+ }, "strip", z.ZodTypeAny, {
1517
+ logo_url: string;
1518
+ header_text_alignment: "center";
1519
+ logo_height: number;
1520
+ logo_position: "center";
1521
+ social_buttons_layout: "bottom";
1522
+ }, {
1523
+ logo_url: string;
1524
+ header_text_alignment: "center";
1525
+ logo_height: number;
1526
+ logo_position: "center";
1527
+ social_buttons_layout: "bottom";
1528
+ }>;
1529
+ }, {
1530
+ themeId: z.ZodString;
1531
+ }>, "strip", z.ZodTypeAny, {
1532
+ page_background: {
1533
+ background_color: string;
1534
+ background_image_url: string;
1535
+ page_layout: "center";
1536
+ };
1537
+ colors: {
1538
+ base_focus_color: string;
1539
+ base_hover_color: string;
1540
+ body_text: string;
1541
+ captcha_widget_theme: "auto";
1542
+ error: string;
1543
+ header: string;
1544
+ icons: string;
1545
+ input_background: string;
1546
+ input_border: string;
1547
+ input_filled_text: string;
1548
+ input_labels_placeholders: string;
1549
+ links_focused_components: string;
1550
+ primary_button: string;
1551
+ primary_button_label: string;
1552
+ secondary_button_border: string;
1553
+ secondary_button_label: string;
1554
+ success: string;
1555
+ widget_background: string;
1556
+ widget_border: string;
1557
+ };
1558
+ borders: {
1559
+ button_border_radius: number;
1560
+ button_border_weight: number;
1561
+ buttons_style: "pill";
1562
+ input_border_radius: number;
1563
+ input_border_weight: number;
1564
+ inputs_style: "pill";
1565
+ show_widget_shadow: boolean;
1566
+ widget_border_weight: number;
1567
+ widget_corner_radius: number;
1568
+ };
1569
+ displayName: string;
1570
+ fonts: {
1571
+ title: {
1572
+ bold: boolean;
1573
+ size: number;
1574
+ };
1575
+ body_text: {
1576
+ bold: boolean;
1577
+ size: number;
1578
+ };
1579
+ buttons_text: {
1580
+ bold: boolean;
1581
+ size: number;
1582
+ };
1583
+ font_url: string;
1584
+ input_labels: {
1585
+ bold: boolean;
1586
+ size: number;
1587
+ };
1588
+ links: {
1589
+ bold: boolean;
1590
+ size: number;
1591
+ };
1592
+ links_style: "normal";
1593
+ reference_text_size: number;
1594
+ subtitle: {
1595
+ bold: boolean;
1596
+ size: number;
1597
+ };
1598
+ };
1599
+ widget: {
1600
+ logo_url: string;
1601
+ header_text_alignment: "center";
1602
+ logo_height: number;
1603
+ logo_position: "center";
1604
+ social_buttons_layout: "bottom";
1605
+ };
1606
+ themeId: string;
1607
+ }, {
1608
+ page_background: {
1609
+ background_color: string;
1610
+ background_image_url: string;
1611
+ page_layout: "center";
1612
+ };
1613
+ colors: {
1614
+ base_focus_color: string;
1615
+ base_hover_color: string;
1616
+ body_text: string;
1617
+ captcha_widget_theme: "auto";
1618
+ error: string;
1619
+ header: string;
1620
+ icons: string;
1621
+ input_background: string;
1622
+ input_border: string;
1623
+ input_filled_text: string;
1624
+ input_labels_placeholders: string;
1625
+ links_focused_components: string;
1626
+ primary_button: string;
1627
+ primary_button_label: string;
1628
+ secondary_button_border: string;
1629
+ secondary_button_label: string;
1630
+ success: string;
1631
+ widget_background: string;
1632
+ widget_border: string;
1633
+ };
1634
+ borders: {
1635
+ button_border_radius: number;
1636
+ button_border_weight: number;
1637
+ buttons_style: "pill";
1638
+ input_border_radius: number;
1639
+ input_border_weight: number;
1640
+ inputs_style: "pill";
1641
+ show_widget_shadow: boolean;
1642
+ widget_border_weight: number;
1643
+ widget_corner_radius: number;
1644
+ };
1645
+ displayName: string;
1646
+ fonts: {
1647
+ title: {
1648
+ bold: boolean;
1649
+ size: number;
1650
+ };
1651
+ body_text: {
1652
+ bold: boolean;
1653
+ size: number;
1654
+ };
1655
+ buttons_text: {
1656
+ bold: boolean;
1657
+ size: number;
1658
+ };
1659
+ font_url: string;
1660
+ input_labels: {
1661
+ bold: boolean;
1662
+ size: number;
1663
+ };
1664
+ links: {
1665
+ bold: boolean;
1666
+ size: number;
1667
+ };
1668
+ links_style: "normal";
1669
+ reference_text_size: number;
1670
+ subtitle: {
1671
+ bold: boolean;
1672
+ size: number;
1673
+ };
1674
+ };
1675
+ widget: {
1676
+ logo_url: string;
1677
+ header_text_alignment: "center";
1678
+ logo_height: number;
1679
+ logo_position: "center";
1680
+ social_buttons_layout: "bottom";
1681
+ };
1682
+ themeId: string;
1683
+ }>;
1684
+ export type Theme = z.infer<typeof themeSchema>;
1685
+ export interface Ticket {
1686
+ id: string;
1687
+ tenant_id: string;
1688
+ client_id: string;
1689
+ email: string;
1690
+ authParams?: {
1691
+ nonce?: string;
1692
+ state?: string;
1693
+ scope?: string;
1694
+ response_type?: AuthorizationResponseType;
1695
+ response_mode?: AuthorizationResponseMode;
1696
+ redirect_uri?: string;
1697
+ };
1698
+ created_at: Date;
1699
+ expires_at: Date;
1700
+ used_at?: Date;
1701
+ }
1702
+ declare const universalLoginSessionInsertSchema: z.ZodObject<{
800
1703
  id: z.ZodString;
801
- email: z.ZodString;
802
- code: z.ZodString;
803
- ip: z.ZodOptional<z.ZodString>;
804
- send: z.ZodEnum<[
805
- "code",
806
- "link"
807
- ]>;
1704
+ expires_at: z.ZodString;
1705
+ auth0Client: z.ZodOptional<z.ZodString>;
1706
+ authParams: z.ZodObject<{
1707
+ client_id: z.ZodString;
1708
+ vendor_id: z.ZodOptional<z.ZodString>;
1709
+ response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
1710
+ response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
1711
+ redirect_uri: z.ZodOptional<z.ZodString>;
1712
+ audience: z.ZodOptional<z.ZodString>;
1713
+ state: z.ZodOptional<z.ZodString>;
1714
+ nonce: z.ZodOptional<z.ZodString>;
1715
+ scope: z.ZodOptional<z.ZodString>;
1716
+ code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
1717
+ code_challenge: z.ZodOptional<z.ZodString>;
1718
+ username: z.ZodOptional<z.ZodString>;
1719
+ }, "strip", z.ZodTypeAny, {
1720
+ client_id: string;
1721
+ username?: string | undefined;
1722
+ vendor_id?: string | undefined;
1723
+ response_type?: AuthorizationResponseType | undefined;
1724
+ response_mode?: AuthorizationResponseMode | undefined;
1725
+ redirect_uri?: string | undefined;
1726
+ audience?: string | undefined;
1727
+ state?: string | undefined;
1728
+ nonce?: string | undefined;
1729
+ scope?: string | undefined;
1730
+ code_challenge_method?: CodeChallengeMethod | undefined;
1731
+ code_challenge?: string | undefined;
1732
+ }, {
1733
+ client_id: string;
1734
+ username?: string | undefined;
1735
+ vendor_id?: string | undefined;
1736
+ response_type?: AuthorizationResponseType | undefined;
1737
+ response_mode?: AuthorizationResponseMode | undefined;
1738
+ redirect_uri?: string | undefined;
1739
+ audience?: string | undefined;
1740
+ state?: string | undefined;
1741
+ nonce?: string | undefined;
1742
+ scope?: string | undefined;
1743
+ code_challenge_method?: CodeChallengeMethod | undefined;
1744
+ code_challenge?: string | undefined;
1745
+ }>;
1746
+ }, "strip", z.ZodTypeAny, {
1747
+ id: string;
1748
+ expires_at: string;
1749
+ authParams: {
1750
+ client_id: string;
1751
+ username?: string | undefined;
1752
+ vendor_id?: string | undefined;
1753
+ response_type?: AuthorizationResponseType | undefined;
1754
+ response_mode?: AuthorizationResponseMode | undefined;
1755
+ redirect_uri?: string | undefined;
1756
+ audience?: string | undefined;
1757
+ state?: string | undefined;
1758
+ nonce?: string | undefined;
1759
+ scope?: string | undefined;
1760
+ code_challenge_method?: CodeChallengeMethod | undefined;
1761
+ code_challenge?: string | undefined;
1762
+ };
1763
+ auth0Client?: string | undefined;
1764
+ }, {
1765
+ id: string;
1766
+ expires_at: string;
1767
+ authParams: {
1768
+ client_id: string;
1769
+ username?: string | undefined;
1770
+ vendor_id?: string | undefined;
1771
+ response_type?: AuthorizationResponseType | undefined;
1772
+ response_mode?: AuthorizationResponseMode | undefined;
1773
+ redirect_uri?: string | undefined;
1774
+ audience?: string | undefined;
1775
+ state?: string | undefined;
1776
+ nonce?: string | undefined;
1777
+ scope?: string | undefined;
1778
+ code_challenge_method?: CodeChallengeMethod | undefined;
1779
+ code_challenge?: string | undefined;
1780
+ };
1781
+ auth0Client?: string | undefined;
1782
+ }>;
1783
+ export type UniversalLoginSessionInsert = z.infer<typeof universalLoginSessionInsertSchema>;
1784
+ declare const universalLoginSessionSchema: z.ZodObject<{
1785
+ created_at: z.ZodString;
1786
+ updated_at: z.ZodString;
1787
+ id: z.ZodString;
1788
+ expires_at: z.ZodString;
1789
+ auth0Client: z.ZodOptional<z.ZodString>;
808
1790
  authParams: z.ZodObject<{
809
1791
  client_id: z.ZodString;
810
1792
  vendor_id: z.ZodOptional<z.ZodString>;
@@ -845,13 +1827,11 @@ declare const otpInsertSchema: z.ZodObject<{
845
1827
  code_challenge_method?: CodeChallengeMethod | undefined;
846
1828
  code_challenge?: string | undefined;
847
1829
  }>;
848
- expires_at: z.ZodString;
849
- used_at: z.ZodOptional<z.ZodString>;
850
- user_id: z.ZodOptional<z.ZodString>;
851
1830
  }, "strip", z.ZodTypeAny, {
852
- code: string;
853
- email: string;
1831
+ created_at: string;
1832
+ updated_at: string;
854
1833
  id: string;
1834
+ expires_at: string;
855
1835
  authParams: {
856
1836
  client_id: string;
857
1837
  username?: string | undefined;
@@ -866,15 +1846,12 @@ declare const otpInsertSchema: z.ZodObject<{
866
1846
  code_challenge_method?: CodeChallengeMethod | undefined;
867
1847
  code_challenge?: string | undefined;
868
1848
  };
869
- expires_at: string;
870
- send: "code" | "link";
871
- user_id?: string | undefined;
872
- used_at?: string | undefined;
873
- ip?: string | undefined;
1849
+ auth0Client?: string | undefined;
874
1850
  }, {
875
- code: string;
876
- email: string;
1851
+ created_at: string;
1852
+ updated_at: string;
877
1853
  id: string;
1854
+ expires_at: string;
878
1855
  authParams: {
879
1856
  client_id: string;
880
1857
  username?: string | undefined;
@@ -889,14 +1866,10 @@ declare const otpInsertSchema: z.ZodObject<{
889
1866
  code_challenge_method?: CodeChallengeMethod | undefined;
890
1867
  code_challenge?: string | undefined;
891
1868
  };
892
- expires_at: string;
893
- send: "code" | "link";
894
- user_id?: string | undefined;
895
- used_at?: string | undefined;
896
- ip?: string | undefined;
1869
+ auth0Client?: string | undefined;
897
1870
  }>;
898
- export type OTPInsert = z.infer<typeof otpInsertSchema>;
899
- declare const otpSchema: z.ZodObject<{
1871
+ export type UniversalLoginSession = z.infer<typeof universalLoginSessionSchema>;
1872
+ declare const otpInsertSchema: z.ZodObject<{
900
1873
  id: z.ZodString;
901
1874
  email: z.ZodString;
902
1875
  code: z.ZodString;
@@ -948,12 +1921,11 @@ declare const otpSchema: z.ZodObject<{
948
1921
  expires_at: z.ZodString;
949
1922
  used_at: z.ZodOptional<z.ZodString>;
950
1923
  user_id: z.ZodOptional<z.ZodString>;
951
- created_at: z.ZodString;
952
1924
  }, "strip", z.ZodTypeAny, {
953
1925
  code: string;
954
- created_at: string;
955
1926
  email: string;
956
1927
  id: string;
1928
+ expires_at: string;
957
1929
  authParams: {
958
1930
  client_id: string;
959
1931
  username?: string | undefined;
@@ -968,16 +1940,15 @@ declare const otpSchema: z.ZodObject<{
968
1940
  code_challenge_method?: CodeChallengeMethod | undefined;
969
1941
  code_challenge?: string | undefined;
970
1942
  };
971
- expires_at: string;
972
1943
  send: "code" | "link";
973
1944
  user_id?: string | undefined;
974
1945
  used_at?: string | undefined;
975
1946
  ip?: string | undefined;
976
1947
  }, {
977
1948
  code: string;
978
- created_at: string;
979
1949
  email: string;
980
1950
  id: string;
1951
+ expires_at: string;
981
1952
  authParams: {
982
1953
  client_id: string;
983
1954
  username?: string | undefined;
@@ -992,132 +1963,21 @@ declare const otpSchema: z.ZodObject<{
992
1963
  code_challenge_method?: CodeChallengeMethod | undefined;
993
1964
  code_challenge?: string | undefined;
994
1965
  };
995
- expires_at: string;
996
1966
  send: "code" | "link";
997
1967
  user_id?: string | undefined;
998
1968
  used_at?: string | undefined;
999
1969
  ip?: string | undefined;
1000
1970
  }>;
1001
- export type OTP = z.infer<typeof otpSchema>;
1002
- declare const passwordInsertSchema: z.ZodObject<{
1003
- user_id: z.ZodString;
1004
- password: z.ZodString;
1005
- }, "strip", z.ZodTypeAny, {
1006
- password: string;
1007
- user_id: string;
1008
- }, {
1009
- password: string;
1010
- user_id: string;
1011
- }>;
1012
- export type PasswordInsert = z.infer<typeof passwordInsertSchema>;
1013
- declare const passwordSchema: z.ZodObject<{
1014
- created_at: z.ZodString;
1015
- updated_at: z.ZodString;
1016
- user_id: z.ZodString;
1017
- password: z.ZodString;
1018
- }, "strip", z.ZodTypeAny, {
1019
- password: string;
1020
- created_at: string;
1021
- updated_at: string;
1022
- user_id: string;
1023
- }, {
1024
- password: string;
1025
- created_at: string;
1026
- updated_at: string;
1027
- user_id: string;
1028
- }>;
1029
- export type Password = z.infer<typeof passwordSchema>;
1030
- declare const sessionInsertSchema: z.ZodObject<{
1031
- session_id: z.ZodString;
1032
- client_id: z.ZodString;
1033
- expires_at: z.ZodString;
1034
- used_at: z.ZodString;
1035
- deleted_at: z.ZodOptional<z.ZodString>;
1036
- user_id: z.ZodString;
1037
- }, "strip", z.ZodTypeAny, {
1038
- user_id: string;
1039
- client_id: string;
1040
- expires_at: string;
1041
- used_at: string;
1042
- session_id: string;
1043
- deleted_at?: string | undefined;
1044
- }, {
1045
- user_id: string;
1046
- client_id: string;
1047
- expires_at: string;
1048
- used_at: string;
1049
- session_id: string;
1050
- deleted_at?: string | undefined;
1051
- }>;
1052
- export type SessionInsert = z.infer<typeof sessionInsertSchema>;
1053
- declare const sessionSchema: z.ZodObject<{
1054
- session_id: z.ZodString;
1055
- client_id: z.ZodString;
1056
- expires_at: z.ZodString;
1057
- used_at: z.ZodString;
1058
- deleted_at: z.ZodOptional<z.ZodString>;
1059
- user_id: z.ZodString;
1060
- created_at: z.ZodString;
1061
- }, "strip", z.ZodTypeAny, {
1062
- created_at: string;
1063
- user_id: string;
1064
- client_id: string;
1065
- expires_at: string;
1066
- used_at: string;
1067
- session_id: string;
1068
- deleted_at?: string | undefined;
1069
- }, {
1070
- created_at: string;
1071
- user_id: string;
1072
- client_id: string;
1073
- expires_at: string;
1074
- used_at: string;
1075
- session_id: string;
1076
- deleted_at?: string | undefined;
1077
- }>;
1078
- export type Session = z.infer<typeof sessionSchema>;
1079
- export interface Certificate {
1080
- private_key: string;
1081
- public_key: string;
1082
- kid: string;
1083
- created_at: string;
1084
- revoked_at?: string;
1085
- }
1086
- export interface Tenant {
1087
- id: string;
1088
- name: string;
1089
- audience: string;
1090
- sender_email: string;
1091
- sender_name: string;
1092
- support_url?: string;
1093
- logo?: string;
1094
- primary_color?: string;
1095
- secondary_color?: string;
1096
- language?: string;
1097
- created_at: string;
1098
- updated_at: string;
1099
- }
1100
- export interface Ticket {
1101
- id: string;
1102
- tenant_id: string;
1103
- client_id: string;
1104
- email: string;
1105
- authParams?: {
1106
- nonce?: string;
1107
- state?: string;
1108
- scope?: string;
1109
- response_type?: AuthorizationResponseType;
1110
- response_mode?: AuthorizationResponseMode;
1111
- redirect_uri?: string;
1112
- };
1113
- created_at: Date;
1114
- expires_at: Date;
1115
- used_at?: Date;
1116
- }
1117
- declare const universalLoginSessionInsertSchema: z.ZodObject<{
1971
+ export type OTPInsert = z.infer<typeof otpInsertSchema>;
1972
+ declare const otpSchema: z.ZodObject<{
1118
1973
  id: z.ZodString;
1119
- expires_at: z.ZodString;
1120
- auth0Client: z.ZodOptional<z.ZodString>;
1974
+ email: z.ZodString;
1975
+ code: z.ZodString;
1976
+ ip: z.ZodOptional<z.ZodString>;
1977
+ send: z.ZodEnum<[
1978
+ "code",
1979
+ "link"
1980
+ ]>;
1121
1981
  authParams: z.ZodObject<{
1122
1982
  client_id: z.ZodString;
1123
1983
  vendor_id: z.ZodOptional<z.ZodString>;
@@ -1158,8 +2018,16 @@ declare const universalLoginSessionInsertSchema: z.ZodObject<{
1158
2018
  code_challenge_method?: CodeChallengeMethod | undefined;
1159
2019
  code_challenge?: string | undefined;
1160
2020
  }>;
2021
+ expires_at: z.ZodString;
2022
+ used_at: z.ZodOptional<z.ZodString>;
2023
+ user_id: z.ZodOptional<z.ZodString>;
2024
+ created_at: z.ZodString;
1161
2025
  }, "strip", z.ZodTypeAny, {
2026
+ code: string;
2027
+ created_at: string;
2028
+ email: string;
1162
2029
  id: string;
2030
+ expires_at: string;
1163
2031
  authParams: {
1164
2032
  client_id: string;
1165
2033
  username?: string | undefined;
@@ -1174,10 +2042,16 @@ declare const universalLoginSessionInsertSchema: z.ZodObject<{
1174
2042
  code_challenge_method?: CodeChallengeMethod | undefined;
1175
2043
  code_challenge?: string | undefined;
1176
2044
  };
1177
- expires_at: string;
1178
- auth0Client?: string | undefined;
2045
+ send: "code" | "link";
2046
+ user_id?: string | undefined;
2047
+ used_at?: string | undefined;
2048
+ ip?: string | undefined;
1179
2049
  }, {
2050
+ code: string;
2051
+ created_at: string;
2052
+ email: string;
1180
2053
  id: string;
2054
+ expires_at: string;
1181
2055
  authParams: {
1182
2056
  client_id: string;
1183
2057
  username?: string | undefined;
@@ -1192,16 +2066,14 @@ declare const universalLoginSessionInsertSchema: z.ZodObject<{
1192
2066
  code_challenge_method?: CodeChallengeMethod | undefined;
1193
2067
  code_challenge?: string | undefined;
1194
2068
  };
1195
- expires_at: string;
1196
- auth0Client?: string | undefined;
2069
+ send: "code" | "link";
2070
+ user_id?: string | undefined;
2071
+ used_at?: string | undefined;
2072
+ ip?: string | undefined;
1197
2073
  }>;
1198
- export type UniversalLoginSessionInsert = z.infer<typeof universalLoginSessionInsertSchema>;
1199
- declare const universalLoginSessionSchema: z.ZodObject<{
2074
+ export type OTP = z.infer<typeof otpSchema>;
2075
+ declare const authenticationCodeSchema: z.ZodObject<{
1200
2076
  created_at: z.ZodString;
1201
- updated_at: z.ZodString;
1202
- id: z.ZodString;
1203
- expires_at: z.ZodString;
1204
- auth0Client: z.ZodOptional<z.ZodString>;
1205
2077
  authParams: z.ZodObject<{
1206
2078
  client_id: z.ZodString;
1207
2079
  vendor_id: z.ZodOptional<z.ZodString>;
@@ -1242,10 +2114,15 @@ declare const universalLoginSessionSchema: z.ZodObject<{
1242
2114
  code_challenge_method?: CodeChallengeMethod | undefined;
1243
2115
  code_challenge?: string | undefined;
1244
2116
  }>;
2117
+ code: z.ZodString;
2118
+ user_id: z.ZodString;
2119
+ expires_at: z.ZodString;
2120
+ used_at: z.ZodOptional<z.ZodString>;
1245
2121
  }, "strip", z.ZodTypeAny, {
2122
+ code: string;
1246
2123
  created_at: string;
1247
- updated_at: string;
1248
- id: string;
2124
+ user_id: string;
2125
+ expires_at: string;
1249
2126
  authParams: {
1250
2127
  client_id: string;
1251
2128
  username?: string | undefined;
@@ -1260,12 +2137,12 @@ declare const universalLoginSessionSchema: z.ZodObject<{
1260
2137
  code_challenge_method?: CodeChallengeMethod | undefined;
1261
2138
  code_challenge?: string | undefined;
1262
2139
  };
1263
- expires_at: string;
1264
- auth0Client?: string | undefined;
2140
+ used_at?: string | undefined;
1265
2141
  }, {
2142
+ code: string;
1266
2143
  created_at: string;
1267
- updated_at: string;
1268
- id: string;
2144
+ user_id: string;
2145
+ expires_at: string;
1269
2146
  authParams: {
1270
2147
  client_id: string;
1271
2148
  username?: string | undefined;
@@ -1280,13 +2157,27 @@ declare const universalLoginSessionSchema: z.ZodObject<{
1280
2157
  code_challenge_method?: CodeChallengeMethod | undefined;
1281
2158
  code_challenge?: string | undefined;
1282
2159
  };
1283
- expires_at: string;
1284
- auth0Client?: string | undefined;
2160
+ used_at?: string | undefined;
1285
2161
  }>;
1286
- export type UniversalLoginSession = z.infer<typeof universalLoginSessionSchema>;
2162
+ export type AuthenticationCode = z.infer<typeof authenticationCodeSchema>;
2163
+ export interface ListParams {
2164
+ page: number;
2165
+ per_page: number;
2166
+ include_totals: boolean;
2167
+ q?: string;
2168
+ sort?: {
2169
+ sort_by: string;
2170
+ sort_order: "asc" | "desc";
2171
+ };
2172
+ }
2173
+ export interface ListCodesResponse extends Totals {
2174
+ codes: Code[];
2175
+ }
1287
2176
  export interface CodesAdapter {
1288
- create: (tenant_id: string, authCode: Code) => Promise<void>;
1289
- list: (tenant_id: string, user_id: string) => Promise<Code[]>;
2177
+ create: (tenant_id: string, authCode: Code) => Promise<Code>;
2178
+ get: (tenant_id: string, code_id: string, type: CodeType) => Promise<Code | null>;
2179
+ list: (tenant_id: string, params: ListParams) => Promise<ListCodesResponse>;
2180
+ remove: (tenant_id: string, code: string) => Promise<boolean>;
1290
2181
  }
1291
2182
  export interface OTPAdapter {
1292
2183
  create: (tenant_id: string, authCode: OTPInsert) => Promise<void>;
@@ -1298,16 +2189,6 @@ export interface PasswordsAdapter {
1298
2189
  update: (tenant_id: string, params: PasswordInsert) => Promise<boolean>;
1299
2190
  get: (tenant_id: string, user_id: string) => Promise<Password>;
1300
2191
  }
1301
- export interface ListParams {
1302
- page: number;
1303
- per_page: number;
1304
- include_totals: boolean;
1305
- q?: string;
1306
- sort?: {
1307
- sort_by: string;
1308
- sort_order: "asc" | "desc";
1309
- };
1310
- }
1311
2192
  export interface ListSesssionsResponse extends Totals {
1312
2193
  sessions: Session[];
1313
2194
  }
@@ -1426,6 +2307,12 @@ export interface HooksAdapter {
1426
2307
  update: (tenant_id: string, hook_id: string, hook: Partial<HookInsert>) => Promise<boolean>;
1427
2308
  list: (tenant_id: string, params: ListParams) => Promise<ListHooksResponse>;
1428
2309
  }
2310
+ export interface ThemesAdapter {
2311
+ create: (tenant_id: string, theme: ThemeInsert) => Promise<Theme>;
2312
+ remove: (tenant_id: string, themeId: string) => Promise<boolean>;
2313
+ get: (tenant_id: string, themeId: string) => Promise<Theme | null>;
2314
+ update: (tenant_id: string, themeId: any, theme: Partial<ThemeInsert>) => Promise<boolean>;
2315
+ }
1429
2316
  export interface SqlAuthenticationCode {
1430
2317
  code: string;
1431
2318
  tenant_id: string;
@@ -1540,6 +2427,16 @@ declare const sqlThemeSchema: z.ZodObject<z.objectUtil.extendShape<any, {
1540
2427
  tenant_id?: unknown;
1541
2428
  }>;
1542
2429
  export type SqlTheme = z.infer<typeof sqlThemeSchema>;
2430
+ declare const sqlLoginSchema: z.ZodObject<z.objectUtil.extendShape<any, {
2431
+ tenant_id: z.ZodString;
2432
+ }>, "strip", z.ZodTypeAny, {
2433
+ [x: string]: any;
2434
+ tenant_id?: unknown;
2435
+ }, {
2436
+ [x: string]: any;
2437
+ tenant_id?: unknown;
2438
+ }>;
2439
+ export type SqlLogin = z.infer<typeof sqlLoginSchema>;
1543
2440
  export interface Database {
1544
2441
  applications: Application & {
1545
2442
  tenant_id: string;
@@ -1559,6 +2456,7 @@ export interface Database {
1559
2456
  tenant_id: string;
1560
2457
  };
1561
2458
  keys: Certificate;
2459
+ logins: SqlLogin;
1562
2460
  logs: SqlLog;
1563
2461
  otps: SqlOTP;
1564
2462
  passwords: Password & {
@@ -1637,6 +2535,7 @@ declare function createAdapters(db: Kysely<Database>): {
1637
2535
  users: UserDataAdapter;
1638
2536
  sessions: SessionsAdapter;
1639
2537
  tenants: TenantsDataAdapter;
2538
+ themes: ThemesAdapter;
1640
2539
  tickets: TicketsAdapter;
1641
2540
  universalLoginSessions: UniversalLoginSessionsAdapter;
1642
2541
  };