@authhero/kysely-adapter 0.7.10 → 0.7.14

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.
@@ -1049,7 +1049,7 @@ declare const codeTypeSchema: z.ZodEnum<[
1049
1049
  "password_reset",
1050
1050
  "email_verification",
1051
1051
  "otp",
1052
- "oauth2",
1052
+ "authorization_code",
1053
1053
  "oauth2_state",
1054
1054
  "ticket"
1055
1055
  ]>;
@@ -1062,24 +1062,27 @@ declare const codeInsertSchema: z.ZodObject<{
1062
1062
  "password_reset",
1063
1063
  "email_verification",
1064
1064
  "otp",
1065
- "oauth2",
1065
+ "authorization_code",
1066
1066
  "oauth2_state",
1067
1067
  "ticket"
1068
1068
  ]>;
1069
1069
  expires_at: z.ZodString;
1070
1070
  used_at: z.ZodOptional<z.ZodString>;
1071
+ user_id: z.ZodOptional<z.ZodString>;
1071
1072
  }, "strip", z.ZodTypeAny, {
1072
1073
  code_id: string;
1073
1074
  login_id: string;
1074
- code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
1075
+ code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1075
1076
  expires_at: string;
1077
+ user_id?: string | undefined;
1076
1078
  connection_id?: string | undefined;
1077
1079
  used_at?: string | undefined;
1078
1080
  }, {
1079
1081
  code_id: string;
1080
1082
  login_id: string;
1081
- code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
1083
+ code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1082
1084
  expires_at: string;
1085
+ user_id?: string | undefined;
1083
1086
  connection_id?: string | undefined;
1084
1087
  used_at?: string | undefined;
1085
1088
  }>;
@@ -1093,26 +1096,29 @@ declare const codeSchema: z.ZodObject<{
1093
1096
  "password_reset",
1094
1097
  "email_verification",
1095
1098
  "otp",
1096
- "oauth2",
1099
+ "authorization_code",
1097
1100
  "oauth2_state",
1098
1101
  "ticket"
1099
1102
  ]>;
1100
1103
  expires_at: z.ZodString;
1101
1104
  used_at: z.ZodOptional<z.ZodString>;
1105
+ user_id: z.ZodOptional<z.ZodString>;
1102
1106
  }, "strip", z.ZodTypeAny, {
1103
1107
  created_at: string;
1104
1108
  code_id: string;
1105
1109
  login_id: string;
1106
- code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
1110
+ code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1107
1111
  expires_at: string;
1112
+ user_id?: string | undefined;
1108
1113
  connection_id?: string | undefined;
1109
1114
  used_at?: string | undefined;
1110
1115
  }, {
1111
1116
  created_at: string;
1112
1117
  code_id: string;
1113
1118
  login_id: string;
1114
- code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
1119
+ code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1115
1120
  expires_at: string;
1121
+ user_id?: string | undefined;
1116
1122
  connection_id?: string | undefined;
1117
1123
  used_at?: string | undefined;
1118
1124
  }>;
@@ -1740,13 +1746,67 @@ declare const sessionSchema: z.ZodObject<{
1740
1746
  deleted_at?: string | undefined;
1741
1747
  }>;
1742
1748
  export type Session = z.infer<typeof sessionSchema>;
1743
- export interface Certificate {
1744
- private_key: string;
1745
- public_key: string;
1749
+ declare const certificateSchema: z.ZodObject<{
1750
+ private_key: z.ZodOptional<z.ZodString>;
1751
+ public_key: z.ZodOptional<z.ZodString>;
1752
+ kid: z.ZodString;
1753
+ created_at: z.ZodOptional<z.ZodString>;
1754
+ revoked_at: z.ZodOptional<z.ZodString>;
1755
+ }, "strip", z.ZodTypeAny, {
1746
1756
  kid: string;
1747
- created_at: string;
1748
- revoked_at?: string;
1749
- }
1757
+ created_at?: string | undefined;
1758
+ private_key?: string | undefined;
1759
+ public_key?: string | undefined;
1760
+ revoked_at?: string | undefined;
1761
+ }, {
1762
+ kid: string;
1763
+ created_at?: string | undefined;
1764
+ private_key?: string | undefined;
1765
+ public_key?: string | undefined;
1766
+ revoked_at?: string | undefined;
1767
+ }>;
1768
+ export type Certificate = z.infer<typeof certificateSchema>;
1769
+ declare const signingKeySchema: z.ZodObject<{
1770
+ kid: z.ZodString;
1771
+ cert: z.ZodString;
1772
+ fingerprint: z.ZodString;
1773
+ thumbprint: z.ZodString;
1774
+ pkcs7: z.ZodOptional<z.ZodString>;
1775
+ current: z.ZodOptional<z.ZodBoolean>;
1776
+ next: z.ZodOptional<z.ZodBoolean>;
1777
+ previous: z.ZodOptional<z.ZodBoolean>;
1778
+ current_since: z.ZodOptional<z.ZodString>;
1779
+ current_until: z.ZodOptional<z.ZodString>;
1780
+ revoked: z.ZodOptional<z.ZodBoolean>;
1781
+ revoked_at: z.ZodOptional<z.ZodString>;
1782
+ }, "strip", z.ZodTypeAny, {
1783
+ kid: string;
1784
+ cert: string;
1785
+ fingerprint: string;
1786
+ thumbprint: string;
1787
+ revoked_at?: string | undefined;
1788
+ pkcs7?: string | undefined;
1789
+ current?: boolean | undefined;
1790
+ next?: boolean | undefined;
1791
+ previous?: boolean | undefined;
1792
+ current_since?: string | undefined;
1793
+ current_until?: string | undefined;
1794
+ revoked?: boolean | undefined;
1795
+ }, {
1796
+ kid: string;
1797
+ cert: string;
1798
+ fingerprint: string;
1799
+ thumbprint: string;
1800
+ revoked_at?: string | undefined;
1801
+ pkcs7?: string | undefined;
1802
+ current?: boolean | undefined;
1803
+ next?: boolean | undefined;
1804
+ previous?: boolean | undefined;
1805
+ current_since?: string | undefined;
1806
+ current_until?: string | undefined;
1807
+ revoked?: boolean | undefined;
1808
+ }>;
1809
+ export type SigningKey = z.infer<typeof signingKeySchema>;
1750
1810
  export interface Tenant {
1751
1811
  id: string;
1752
1812
  name: string;
@@ -2612,467 +2672,6 @@ export interface Ticket {
2612
2672
  expires_at: Date;
2613
2673
  used_at?: Date;
2614
2674
  }
2615
- declare const universalLoginSessionInsertSchema: z.ZodObject<{
2616
- id: z.ZodString;
2617
- expires_at: z.ZodString;
2618
- auth0Client: z.ZodOptional<z.ZodString>;
2619
- authParams: z.ZodObject<{
2620
- client_id: z.ZodString;
2621
- vendor_id: z.ZodOptional<z.ZodString>;
2622
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
2623
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
2624
- redirect_uri: z.ZodOptional<z.ZodString>;
2625
- audience: z.ZodOptional<z.ZodString>;
2626
- state: z.ZodOptional<z.ZodString>;
2627
- nonce: z.ZodOptional<z.ZodString>;
2628
- scope: z.ZodOptional<z.ZodString>;
2629
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
2630
- code_challenge: z.ZodOptional<z.ZodString>;
2631
- username: z.ZodOptional<z.ZodString>;
2632
- }, "strip", z.ZodTypeAny, {
2633
- client_id: string;
2634
- username?: string | undefined;
2635
- audience?: string | undefined;
2636
- vendor_id?: string | undefined;
2637
- response_type?: AuthorizationResponseType | undefined;
2638
- response_mode?: AuthorizationResponseMode | undefined;
2639
- redirect_uri?: string | undefined;
2640
- state?: string | undefined;
2641
- nonce?: string | undefined;
2642
- scope?: string | undefined;
2643
- code_challenge_method?: CodeChallengeMethod | undefined;
2644
- code_challenge?: string | undefined;
2645
- }, {
2646
- client_id: string;
2647
- username?: string | undefined;
2648
- audience?: string | undefined;
2649
- vendor_id?: string | undefined;
2650
- response_type?: AuthorizationResponseType | undefined;
2651
- response_mode?: AuthorizationResponseMode | undefined;
2652
- redirect_uri?: string | undefined;
2653
- state?: string | undefined;
2654
- nonce?: string | undefined;
2655
- scope?: string | undefined;
2656
- code_challenge_method?: CodeChallengeMethod | undefined;
2657
- code_challenge?: string | undefined;
2658
- }>;
2659
- }, "strip", z.ZodTypeAny, {
2660
- id: string;
2661
- expires_at: string;
2662
- authParams: {
2663
- client_id: string;
2664
- username?: string | undefined;
2665
- audience?: string | undefined;
2666
- vendor_id?: string | undefined;
2667
- response_type?: AuthorizationResponseType | undefined;
2668
- response_mode?: AuthorizationResponseMode | undefined;
2669
- redirect_uri?: string | undefined;
2670
- state?: string | undefined;
2671
- nonce?: string | undefined;
2672
- scope?: string | undefined;
2673
- code_challenge_method?: CodeChallengeMethod | undefined;
2674
- code_challenge?: string | undefined;
2675
- };
2676
- auth0Client?: string | undefined;
2677
- }, {
2678
- id: string;
2679
- expires_at: string;
2680
- authParams: {
2681
- client_id: string;
2682
- username?: string | undefined;
2683
- audience?: string | undefined;
2684
- vendor_id?: string | undefined;
2685
- response_type?: AuthorizationResponseType | undefined;
2686
- response_mode?: AuthorizationResponseMode | undefined;
2687
- redirect_uri?: string | undefined;
2688
- state?: string | undefined;
2689
- nonce?: string | undefined;
2690
- scope?: string | undefined;
2691
- code_challenge_method?: CodeChallengeMethod | undefined;
2692
- code_challenge?: string | undefined;
2693
- };
2694
- auth0Client?: string | undefined;
2695
- }>;
2696
- export type UniversalLoginSessionInsert = z.infer<typeof universalLoginSessionInsertSchema>;
2697
- declare const universalLoginSessionSchema: z.ZodObject<{
2698
- created_at: z.ZodString;
2699
- updated_at: z.ZodString;
2700
- id: z.ZodString;
2701
- expires_at: z.ZodString;
2702
- auth0Client: z.ZodOptional<z.ZodString>;
2703
- authParams: z.ZodObject<{
2704
- client_id: z.ZodString;
2705
- vendor_id: z.ZodOptional<z.ZodString>;
2706
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
2707
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
2708
- redirect_uri: z.ZodOptional<z.ZodString>;
2709
- audience: z.ZodOptional<z.ZodString>;
2710
- state: z.ZodOptional<z.ZodString>;
2711
- nonce: z.ZodOptional<z.ZodString>;
2712
- scope: z.ZodOptional<z.ZodString>;
2713
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
2714
- code_challenge: z.ZodOptional<z.ZodString>;
2715
- username: z.ZodOptional<z.ZodString>;
2716
- }, "strip", z.ZodTypeAny, {
2717
- client_id: string;
2718
- username?: string | undefined;
2719
- audience?: string | undefined;
2720
- vendor_id?: string | undefined;
2721
- response_type?: AuthorizationResponseType | undefined;
2722
- response_mode?: AuthorizationResponseMode | undefined;
2723
- redirect_uri?: string | undefined;
2724
- state?: string | undefined;
2725
- nonce?: string | undefined;
2726
- scope?: string | undefined;
2727
- code_challenge_method?: CodeChallengeMethod | undefined;
2728
- code_challenge?: string | undefined;
2729
- }, {
2730
- client_id: string;
2731
- username?: string | undefined;
2732
- audience?: string | undefined;
2733
- vendor_id?: string | undefined;
2734
- response_type?: AuthorizationResponseType | undefined;
2735
- response_mode?: AuthorizationResponseMode | undefined;
2736
- redirect_uri?: string | undefined;
2737
- state?: string | undefined;
2738
- nonce?: string | undefined;
2739
- scope?: string | undefined;
2740
- code_challenge_method?: CodeChallengeMethod | undefined;
2741
- code_challenge?: string | undefined;
2742
- }>;
2743
- }, "strip", z.ZodTypeAny, {
2744
- created_at: string;
2745
- updated_at: string;
2746
- id: string;
2747
- expires_at: string;
2748
- authParams: {
2749
- client_id: string;
2750
- username?: string | undefined;
2751
- audience?: string | undefined;
2752
- vendor_id?: string | undefined;
2753
- response_type?: AuthorizationResponseType | undefined;
2754
- response_mode?: AuthorizationResponseMode | undefined;
2755
- redirect_uri?: string | undefined;
2756
- state?: string | undefined;
2757
- nonce?: string | undefined;
2758
- scope?: string | undefined;
2759
- code_challenge_method?: CodeChallengeMethod | undefined;
2760
- code_challenge?: string | undefined;
2761
- };
2762
- auth0Client?: string | undefined;
2763
- }, {
2764
- created_at: string;
2765
- updated_at: string;
2766
- id: string;
2767
- expires_at: string;
2768
- authParams: {
2769
- client_id: string;
2770
- username?: string | undefined;
2771
- audience?: string | undefined;
2772
- vendor_id?: string | undefined;
2773
- response_type?: AuthorizationResponseType | undefined;
2774
- response_mode?: AuthorizationResponseMode | undefined;
2775
- redirect_uri?: string | undefined;
2776
- state?: string | undefined;
2777
- nonce?: string | undefined;
2778
- scope?: string | undefined;
2779
- code_challenge_method?: CodeChallengeMethod | undefined;
2780
- code_challenge?: string | undefined;
2781
- };
2782
- auth0Client?: string | undefined;
2783
- }>;
2784
- export type UniversalLoginSession = z.infer<typeof universalLoginSessionSchema>;
2785
- declare const otpInsertSchema: z.ZodObject<{
2786
- id: z.ZodString;
2787
- email: z.ZodString;
2788
- code: z.ZodString;
2789
- ip: z.ZodOptional<z.ZodString>;
2790
- send: z.ZodEnum<[
2791
- "code",
2792
- "link"
2793
- ]>;
2794
- authParams: z.ZodObject<{
2795
- client_id: z.ZodString;
2796
- vendor_id: z.ZodOptional<z.ZodString>;
2797
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
2798
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
2799
- redirect_uri: z.ZodOptional<z.ZodString>;
2800
- audience: z.ZodOptional<z.ZodString>;
2801
- state: z.ZodOptional<z.ZodString>;
2802
- nonce: z.ZodOptional<z.ZodString>;
2803
- scope: z.ZodOptional<z.ZodString>;
2804
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
2805
- code_challenge: z.ZodOptional<z.ZodString>;
2806
- username: z.ZodOptional<z.ZodString>;
2807
- }, "strip", z.ZodTypeAny, {
2808
- client_id: string;
2809
- username?: string | undefined;
2810
- audience?: string | undefined;
2811
- vendor_id?: string | undefined;
2812
- response_type?: AuthorizationResponseType | undefined;
2813
- response_mode?: AuthorizationResponseMode | undefined;
2814
- redirect_uri?: string | undefined;
2815
- state?: string | undefined;
2816
- nonce?: string | undefined;
2817
- scope?: string | undefined;
2818
- code_challenge_method?: CodeChallengeMethod | undefined;
2819
- code_challenge?: string | undefined;
2820
- }, {
2821
- client_id: string;
2822
- username?: string | undefined;
2823
- audience?: string | undefined;
2824
- vendor_id?: string | undefined;
2825
- response_type?: AuthorizationResponseType | undefined;
2826
- response_mode?: AuthorizationResponseMode | undefined;
2827
- redirect_uri?: string | undefined;
2828
- state?: string | undefined;
2829
- nonce?: string | undefined;
2830
- scope?: string | undefined;
2831
- code_challenge_method?: CodeChallengeMethod | undefined;
2832
- code_challenge?: string | undefined;
2833
- }>;
2834
- expires_at: z.ZodString;
2835
- used_at: z.ZodOptional<z.ZodString>;
2836
- user_id: z.ZodOptional<z.ZodString>;
2837
- }, "strip", z.ZodTypeAny, {
2838
- code: string;
2839
- email: string;
2840
- id: string;
2841
- expires_at: string;
2842
- authParams: {
2843
- client_id: string;
2844
- username?: string | undefined;
2845
- audience?: string | undefined;
2846
- vendor_id?: string | undefined;
2847
- response_type?: AuthorizationResponseType | undefined;
2848
- response_mode?: AuthorizationResponseMode | undefined;
2849
- redirect_uri?: string | undefined;
2850
- state?: string | undefined;
2851
- nonce?: string | undefined;
2852
- scope?: string | undefined;
2853
- code_challenge_method?: CodeChallengeMethod | undefined;
2854
- code_challenge?: string | undefined;
2855
- };
2856
- send: "code" | "link";
2857
- user_id?: string | undefined;
2858
- used_at?: string | undefined;
2859
- ip?: string | undefined;
2860
- }, {
2861
- code: string;
2862
- email: string;
2863
- id: string;
2864
- expires_at: string;
2865
- authParams: {
2866
- client_id: string;
2867
- username?: string | undefined;
2868
- audience?: string | undefined;
2869
- vendor_id?: string | undefined;
2870
- response_type?: AuthorizationResponseType | undefined;
2871
- response_mode?: AuthorizationResponseMode | undefined;
2872
- redirect_uri?: string | undefined;
2873
- state?: string | undefined;
2874
- nonce?: string | undefined;
2875
- scope?: string | undefined;
2876
- code_challenge_method?: CodeChallengeMethod | undefined;
2877
- code_challenge?: string | undefined;
2878
- };
2879
- send: "code" | "link";
2880
- user_id?: string | undefined;
2881
- used_at?: string | undefined;
2882
- ip?: string | undefined;
2883
- }>;
2884
- export type OTPInsert = z.infer<typeof otpInsertSchema>;
2885
- declare const otpSchema: z.ZodObject<{
2886
- id: z.ZodString;
2887
- email: z.ZodString;
2888
- code: z.ZodString;
2889
- ip: z.ZodOptional<z.ZodString>;
2890
- send: z.ZodEnum<[
2891
- "code",
2892
- "link"
2893
- ]>;
2894
- authParams: z.ZodObject<{
2895
- client_id: z.ZodString;
2896
- vendor_id: z.ZodOptional<z.ZodString>;
2897
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
2898
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
2899
- redirect_uri: z.ZodOptional<z.ZodString>;
2900
- audience: z.ZodOptional<z.ZodString>;
2901
- state: z.ZodOptional<z.ZodString>;
2902
- nonce: z.ZodOptional<z.ZodString>;
2903
- scope: z.ZodOptional<z.ZodString>;
2904
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
2905
- code_challenge: z.ZodOptional<z.ZodString>;
2906
- username: z.ZodOptional<z.ZodString>;
2907
- }, "strip", z.ZodTypeAny, {
2908
- client_id: string;
2909
- username?: string | undefined;
2910
- audience?: string | undefined;
2911
- vendor_id?: string | undefined;
2912
- response_type?: AuthorizationResponseType | undefined;
2913
- response_mode?: AuthorizationResponseMode | undefined;
2914
- redirect_uri?: string | undefined;
2915
- state?: string | undefined;
2916
- nonce?: string | undefined;
2917
- scope?: string | undefined;
2918
- code_challenge_method?: CodeChallengeMethod | undefined;
2919
- code_challenge?: string | undefined;
2920
- }, {
2921
- client_id: string;
2922
- username?: string | undefined;
2923
- audience?: string | undefined;
2924
- vendor_id?: string | undefined;
2925
- response_type?: AuthorizationResponseType | undefined;
2926
- response_mode?: AuthorizationResponseMode | undefined;
2927
- redirect_uri?: string | undefined;
2928
- state?: string | undefined;
2929
- nonce?: string | undefined;
2930
- scope?: string | undefined;
2931
- code_challenge_method?: CodeChallengeMethod | undefined;
2932
- code_challenge?: string | undefined;
2933
- }>;
2934
- expires_at: z.ZodString;
2935
- used_at: z.ZodOptional<z.ZodString>;
2936
- user_id: z.ZodOptional<z.ZodString>;
2937
- created_at: z.ZodString;
2938
- }, "strip", z.ZodTypeAny, {
2939
- code: string;
2940
- created_at: string;
2941
- email: string;
2942
- id: string;
2943
- expires_at: string;
2944
- authParams: {
2945
- client_id: string;
2946
- username?: string | undefined;
2947
- audience?: string | undefined;
2948
- vendor_id?: string | undefined;
2949
- response_type?: AuthorizationResponseType | undefined;
2950
- response_mode?: AuthorizationResponseMode | undefined;
2951
- redirect_uri?: string | undefined;
2952
- state?: string | undefined;
2953
- nonce?: string | undefined;
2954
- scope?: string | undefined;
2955
- code_challenge_method?: CodeChallengeMethod | undefined;
2956
- code_challenge?: string | undefined;
2957
- };
2958
- send: "code" | "link";
2959
- user_id?: string | undefined;
2960
- used_at?: string | undefined;
2961
- ip?: string | undefined;
2962
- }, {
2963
- code: string;
2964
- created_at: string;
2965
- email: string;
2966
- id: string;
2967
- expires_at: string;
2968
- authParams: {
2969
- client_id: string;
2970
- username?: string | undefined;
2971
- audience?: string | undefined;
2972
- vendor_id?: string | undefined;
2973
- response_type?: AuthorizationResponseType | undefined;
2974
- response_mode?: AuthorizationResponseMode | undefined;
2975
- redirect_uri?: string | undefined;
2976
- state?: string | undefined;
2977
- nonce?: string | undefined;
2978
- scope?: string | undefined;
2979
- code_challenge_method?: CodeChallengeMethod | undefined;
2980
- code_challenge?: string | undefined;
2981
- };
2982
- send: "code" | "link";
2983
- user_id?: string | undefined;
2984
- used_at?: string | undefined;
2985
- ip?: string | undefined;
2986
- }>;
2987
- export type OTP = z.infer<typeof otpSchema>;
2988
- declare const authenticationCodeSchema: z.ZodObject<{
2989
- created_at: z.ZodString;
2990
- authParams: z.ZodObject<{
2991
- client_id: z.ZodString;
2992
- vendor_id: z.ZodOptional<z.ZodString>;
2993
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
2994
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
2995
- redirect_uri: z.ZodOptional<z.ZodString>;
2996
- audience: z.ZodOptional<z.ZodString>;
2997
- state: z.ZodOptional<z.ZodString>;
2998
- nonce: z.ZodOptional<z.ZodString>;
2999
- scope: z.ZodOptional<z.ZodString>;
3000
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
3001
- code_challenge: z.ZodOptional<z.ZodString>;
3002
- username: z.ZodOptional<z.ZodString>;
3003
- }, "strip", z.ZodTypeAny, {
3004
- client_id: string;
3005
- username?: string | undefined;
3006
- audience?: string | undefined;
3007
- vendor_id?: string | undefined;
3008
- response_type?: AuthorizationResponseType | undefined;
3009
- response_mode?: AuthorizationResponseMode | undefined;
3010
- redirect_uri?: string | undefined;
3011
- state?: string | undefined;
3012
- nonce?: string | undefined;
3013
- scope?: string | undefined;
3014
- code_challenge_method?: CodeChallengeMethod | undefined;
3015
- code_challenge?: string | undefined;
3016
- }, {
3017
- client_id: string;
3018
- username?: string | undefined;
3019
- audience?: string | undefined;
3020
- vendor_id?: string | undefined;
3021
- response_type?: AuthorizationResponseType | undefined;
3022
- response_mode?: AuthorizationResponseMode | undefined;
3023
- redirect_uri?: string | undefined;
3024
- state?: string | undefined;
3025
- nonce?: string | undefined;
3026
- scope?: string | undefined;
3027
- code_challenge_method?: CodeChallengeMethod | undefined;
3028
- code_challenge?: string | undefined;
3029
- }>;
3030
- code: z.ZodString;
3031
- user_id: z.ZodString;
3032
- expires_at: z.ZodString;
3033
- used_at: z.ZodOptional<z.ZodString>;
3034
- }, "strip", z.ZodTypeAny, {
3035
- code: string;
3036
- created_at: string;
3037
- user_id: string;
3038
- expires_at: string;
3039
- authParams: {
3040
- client_id: string;
3041
- username?: string | undefined;
3042
- audience?: string | undefined;
3043
- vendor_id?: string | undefined;
3044
- response_type?: AuthorizationResponseType | undefined;
3045
- response_mode?: AuthorizationResponseMode | undefined;
3046
- redirect_uri?: string | undefined;
3047
- state?: string | undefined;
3048
- nonce?: string | undefined;
3049
- scope?: string | undefined;
3050
- code_challenge_method?: CodeChallengeMethod | undefined;
3051
- code_challenge?: string | undefined;
3052
- };
3053
- used_at?: string | undefined;
3054
- }, {
3055
- code: string;
3056
- created_at: string;
3057
- user_id: string;
3058
- expires_at: string;
3059
- authParams: {
3060
- client_id: string;
3061
- username?: string | undefined;
3062
- audience?: string | undefined;
3063
- vendor_id?: string | undefined;
3064
- response_type?: AuthorizationResponseType | undefined;
3065
- response_mode?: AuthorizationResponseMode | undefined;
3066
- redirect_uri?: string | undefined;
3067
- state?: string | undefined;
3068
- nonce?: string | undefined;
3069
- scope?: string | undefined;
3070
- code_challenge_method?: CodeChallengeMethod | undefined;
3071
- code_challenge?: string | undefined;
3072
- };
3073
- used_at?: string | undefined;
3074
- }>;
3075
- export type AuthenticationCode = z.infer<typeof authenticationCodeSchema>;
3076
2675
  export interface ListParams {
3077
2676
  page: number;
3078
2677
  per_page: number;
@@ -3092,11 +2691,6 @@ export interface CodesAdapter {
3092
2691
  list: (tenant_id: string, params: ListParams) => Promise<ListCodesResponse>;
3093
2692
  remove: (tenant_id: string, code: string) => Promise<boolean>;
3094
2693
  }
3095
- export interface OTPAdapter {
3096
- create: (tenant_id: string, authCode: OTPInsert) => Promise<void>;
3097
- list: (tenant_id: string, email: string) => Promise<OTP[]>;
3098
- remove: (tenant_id: string, id: string) => Promise<boolean>;
3099
- }
3100
2694
  export interface PasswordsAdapter {
3101
2695
  create: (tenant_id: string, params: PasswordInsert) => Promise<Password>;
3102
2696
  update: (tenant_id: string, params: PasswordInsert) => Promise<boolean>;
@@ -3165,11 +2759,6 @@ export interface ApplicationsAdapter {
3165
2759
  }>;
3166
2760
  update(tenant_id: string, id: string, application: Partial<Application>): Promise<boolean>;
3167
2761
  }
3168
- export interface UniversalLoginSessionsAdapter {
3169
- create: (tenant_id: string, session: UniversalLoginSessionInsert) => Promise<UniversalLoginSession>;
3170
- update: (tenant_id: string, id: string, session: UniversalLoginSession) => Promise<boolean>;
3171
- get: (id: string) => Promise<UniversalLoginSession | null>;
3172
- }
3173
2762
  export interface ListConnectionsResponse extends Totals {
3174
2763
  connections: Connection[];
3175
2764
  }
@@ -3188,18 +2777,14 @@ export interface DomainsAdapter {
3188
2777
  list(tenant_id: string, params: ListParams): Promise<ListDomainsResponse>;
3189
2778
  }
3190
2779
  export interface KeysAdapter {
3191
- create: (key: Certificate) => Promise<void>;
3192
- list: () => Promise<Certificate[]>;
2780
+ create: (key: SigningKey) => Promise<void>;
2781
+ list: () => Promise<(Certificate | SigningKey)[]>;
3193
2782
  revoke: (kid: string, revoke_at: Date) => Promise<boolean>;
3194
2783
  }
3195
2784
  export interface BrandingAdapter {
3196
2785
  set: (tenant_id: string, authCode: Branding) => Promise<void>;
3197
2786
  get: (tenant_id: string) => Promise<Branding | null>;
3198
2787
  }
3199
- export interface AuthenticationCodesAdapter {
3200
- create: (tenant_id: string, authCode: AuthenticationCode) => Promise<void>;
3201
- get: (tenant_id: string, code: string) => Promise<AuthenticationCode>;
3202
- }
3203
2788
  export interface ListHooksResponse extends Totals {
3204
2789
  hooks: Hook[];
3205
2790
  }
@@ -3227,7 +2812,6 @@ export interface LoginsAdapter {
3227
2812
  }
3228
2813
  export interface DataAdapters {
3229
2814
  applications: ApplicationsAdapter;
3230
- authenticationCodes: AuthenticationCodesAdapter;
3231
2815
  branding: BrandingAdapter;
3232
2816
  clients: ClientsAdapter;
3233
2817
  codes: CodesAdapter;
@@ -3237,30 +2821,13 @@ export interface DataAdapters {
3237
2821
  keys: KeysAdapter;
3238
2822
  logins: LoginsAdapter;
3239
2823
  logs: LogsDataAdapter;
3240
- OTP: OTPAdapter;
3241
2824
  passwords: PasswordsAdapter;
3242
2825
  sessions: SessionsAdapter;
3243
2826
  tenants: TenantsDataAdapter;
3244
2827
  themes: ThemesAdapter;
3245
2828
  tickets: TicketsAdapter;
3246
- universalLoginSessions: UniversalLoginSessionsAdapter;
3247
2829
  users: UserDataAdapter;
3248
2830
  }
3249
- export interface SqlAuthenticationCode {
3250
- code: string;
3251
- tenant_id: string;
3252
- client_id: string;
3253
- user_id: string;
3254
- nonce?: string;
3255
- state?: string;
3256
- scope?: string;
3257
- response_type?: AuthorizationResponseType;
3258
- response_mode?: AuthorizationResponseMode;
3259
- redirect_uri?: string;
3260
- created_at: string;
3261
- expires_at: string;
3262
- used_at?: string;
3263
- }
3264
2831
  export interface SqlUser extends BaseUser {
3265
2832
  user_id: string;
3266
2833
  email_verified: number;
@@ -3274,23 +2841,6 @@ export interface SqlUser extends BaseUser {
3274
2841
  created_at: string;
3275
2842
  updated_at: string;
3276
2843
  }
3277
- export interface SqlOTP {
3278
- id: string;
3279
- tenant_id: string;
3280
- client_id: string;
3281
- email: string;
3282
- code: string;
3283
- send: "link" | "code";
3284
- nonce?: string;
3285
- state?: string;
3286
- scope?: string;
3287
- response_type?: AuthorizationResponseType;
3288
- redirect_uri?: string;
3289
- created_at: string;
3290
- expires_at: string;
3291
- used_at?: string;
3292
- user_id?: string;
3293
- }
3294
2844
  export interface SqlTicket {
3295
2845
  id: string;
3296
2846
  tenant_id: string;
@@ -3306,26 +2856,6 @@ export interface SqlTicket {
3306
2856
  expires_at: string;
3307
2857
  used_at?: string;
3308
2858
  }
3309
- export interface SqlUniversalLoginSession {
3310
- id: string;
3311
- tenant_id: string;
3312
- client_id: string;
3313
- email?: string;
3314
- nonce?: string;
3315
- state?: string;
3316
- scope?: string;
3317
- response_type?: AuthorizationResponseType;
3318
- response_mode?: AuthorizationResponseMode;
3319
- redirect_uri?: string;
3320
- code_challenge_method?: string;
3321
- code_challenge?: string;
3322
- username?: string;
3323
- vendor_id?: string;
3324
- audience?: string;
3325
- created_at: string;
3326
- expires_at: string;
3327
- updated_at: string;
3328
- }
3329
2859
  export interface SqlLog {
3330
2860
  id: string;
3331
2861
  tenant_id: string;
@@ -3419,7 +2949,6 @@ declare const sqlApplicationSchema: z.ZodObject<{
3419
2949
  }>;
3420
2950
  export interface Database {
3421
2951
  applications: z.infer<typeof sqlApplicationSchema>;
3422
- authentication_codes: SqlAuthenticationCode;
3423
2952
  branding: SqlBranding;
3424
2953
  codes: Code & {
3425
2954
  tenant_id: string;
@@ -3433,10 +2962,11 @@ export interface Database {
3433
2962
  hooks: Hook & {
3434
2963
  tenant_id: string;
3435
2964
  };
3436
- keys: Certificate;
2965
+ keys: Certificate & SigningKey & {
2966
+ created_at: string;
2967
+ };
3437
2968
  logins: SqlLogin;
3438
2969
  logs: SqlLog;
3439
- otps: SqlOTP;
3440
2970
  passwords: Password & {
3441
2971
  tenant_id: string;
3442
2972
  };
@@ -3447,7 +2977,6 @@ export interface Database {
3447
2977
  tenants: Tenant;
3448
2978
  themes: SqlTheme;
3449
2979
  tickets: SqlTicket;
3450
- universal_login_sessions: SqlUniversalLoginSession;
3451
2980
  }
3452
2981
  declare function createAdapters(db: Kysely<Database>): DataAdapters;
3453
2982