@authhero/kysely-adapter 10.59.0 → 10.61.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.
@@ -28,13 +28,12 @@ declare const userInsertSchema: z.ZodObject<{
28
28
  last_ip: z.ZodOptional<z.ZodString>;
29
29
  last_login: z.ZodOptional<z.ZodString>;
30
30
  user_id: z.ZodOptional<z.ZodString>;
31
- provider: z.ZodDefault<z.ZodString>;
32
- connection: z.ZodDefault<z.ZodString>;
31
+ provider: z.ZodOptional<z.ZodString>;
32
+ connection: z.ZodString;
33
33
  is_social: z.ZodOptional<z.ZodBoolean>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  email_verified: boolean;
36
36
  connection: string;
37
- provider: string;
38
37
  email?: string | undefined;
39
38
  name?: string | undefined;
40
39
  username?: string | undefined;
@@ -42,6 +41,7 @@ declare const userInsertSchema: z.ZodObject<{
42
41
  phone_number?: string | undefined;
43
42
  family_name?: string | undefined;
44
43
  user_id?: string | undefined;
44
+ provider?: string | undefined;
45
45
  profileData?: string | undefined;
46
46
  nickname?: string | undefined;
47
47
  picture?: string | undefined;
@@ -54,6 +54,7 @@ declare const userInsertSchema: z.ZodObject<{
54
54
  last_login?: string | undefined;
55
55
  is_social?: boolean | undefined;
56
56
  }, {
57
+ connection: string;
57
58
  email?: string | undefined;
58
59
  email_verified?: boolean | undefined;
59
60
  name?: string | undefined;
@@ -61,7 +62,6 @@ declare const userInsertSchema: z.ZodObject<{
61
62
  given_name?: string | undefined;
62
63
  phone_number?: string | undefined;
63
64
  family_name?: string | undefined;
64
- connection?: string | undefined;
65
65
  user_id?: string | undefined;
66
66
  provider?: string | undefined;
67
67
  profileData?: string | undefined;
@@ -79,6 +79,7 @@ declare const userInsertSchema: z.ZodObject<{
79
79
  export type UserInsert = z.infer<typeof userInsertSchema>;
80
80
  declare const userSchema: z.ZodObject<{
81
81
  user_id: z.ZodString;
82
+ provider: z.ZodString;
82
83
  is_social: z.ZodBoolean;
83
84
  email: z.ZodOptional<z.ZodString>;
84
85
  login_count: z.ZodDefault<z.ZodNumber>;
@@ -173,8 +174,7 @@ declare const userSchema: z.ZodObject<{
173
174
  verify_email: z.ZodOptional<z.ZodBoolean>;
174
175
  last_ip: z.ZodOptional<z.ZodString>;
175
176
  last_login: z.ZodOptional<z.ZodString>;
176
- provider: z.ZodDefault<z.ZodString>;
177
- connection: z.ZodDefault<z.ZodString>;
177
+ connection: z.ZodString;
178
178
  }, "strip", z.ZodTypeAny, {
179
179
  created_at: string;
180
180
  updated_at: string;
@@ -222,7 +222,9 @@ declare const userSchema: z.ZodObject<{
222
222
  }, {
223
223
  created_at: string;
224
224
  updated_at: string;
225
+ connection: string;
225
226
  user_id: string;
227
+ provider: string;
226
228
  is_social: boolean;
227
229
  email?: string | undefined;
228
230
  email_verified?: boolean | undefined;
@@ -231,8 +233,6 @@ declare const userSchema: z.ZodObject<{
231
233
  given_name?: string | undefined;
232
234
  phone_number?: string | undefined;
233
235
  family_name?: string | undefined;
234
- connection?: string | undefined;
235
- provider?: string | undefined;
236
236
  profileData?: string | undefined;
237
237
  nickname?: string | undefined;
238
238
  picture?: string | undefined;
@@ -751,29 +751,29 @@ declare const brandingSchema: z.ZodObject<{
751
751
  end: z.ZodOptional<z.ZodString>;
752
752
  angle_deg: z.ZodOptional<z.ZodNumber>;
753
753
  }, "strip", z.ZodTypeAny, {
754
- start?: string | undefined;
755
754
  type?: string | undefined;
755
+ start?: string | undefined;
756
756
  end?: string | undefined;
757
757
  angle_deg?: number | undefined;
758
758
  }, {
759
- start?: string | undefined;
760
759
  type?: string | undefined;
760
+ start?: string | undefined;
761
761
  end?: string | undefined;
762
762
  angle_deg?: number | undefined;
763
763
  }>>;
764
764
  }, "strip", z.ZodTypeAny, {
765
765
  primary: string;
766
766
  page_background?: {
767
- start?: string | undefined;
768
767
  type?: string | undefined;
768
+ start?: string | undefined;
769
769
  end?: string | undefined;
770
770
  angle_deg?: number | undefined;
771
771
  } | undefined;
772
772
  }, {
773
773
  primary: string;
774
774
  page_background?: {
775
- start?: string | undefined;
776
775
  type?: string | undefined;
776
+ start?: string | undefined;
777
777
  end?: string | undefined;
778
778
  angle_deg?: number | undefined;
779
779
  } | undefined;
@@ -792,8 +792,8 @@ declare const brandingSchema: z.ZodObject<{
792
792
  colors?: {
793
793
  primary: string;
794
794
  page_background?: {
795
- start?: string | undefined;
796
795
  type?: string | undefined;
796
+ start?: string | undefined;
797
797
  end?: string | undefined;
798
798
  angle_deg?: number | undefined;
799
799
  } | undefined;
@@ -808,8 +808,8 @@ declare const brandingSchema: z.ZodObject<{
808
808
  colors?: {
809
809
  primary: string;
810
810
  page_background?: {
811
- start?: string | undefined;
812
811
  type?: string | undefined;
812
+ start?: string | undefined;
813
813
  end?: string | undefined;
814
814
  angle_deg?: number | undefined;
815
815
  } | undefined;
@@ -4683,8 +4683,6 @@ declare const logInsertSchema: z.ZodObject<{
4683
4683
  log_id: z.ZodOptional<z.ZodString>;
4684
4684
  location_info: z.ZodOptional<z.ZodObject<{
4685
4685
  country_code: z.ZodString;
4686
- country_code3: z.ZodString;
4687
- country_name: z.ZodString;
4688
4686
  city_name: z.ZodString;
4689
4687
  latitude: z.ZodString;
4690
4688
  longitude: z.ZodString;
@@ -4692,8 +4690,6 @@ declare const logInsertSchema: z.ZodObject<{
4692
4690
  continent_code: z.ZodString;
4693
4691
  }, "strip", z.ZodTypeAny, {
4694
4692
  country_code: string;
4695
- country_code3: string;
4696
- country_name: string;
4697
4693
  city_name: string;
4698
4694
  latitude: string;
4699
4695
  longitude: string;
@@ -4701,8 +4697,6 @@ declare const logInsertSchema: z.ZodObject<{
4701
4697
  continent_code: string;
4702
4698
  }, {
4703
4699
  country_code: string;
4704
- country_code3: string;
4705
- country_name: string;
4706
4700
  city_name: string;
4707
4701
  latitude: string;
4708
4702
  longitude: string;
@@ -4738,8 +4732,6 @@ declare const logInsertSchema: z.ZodObject<{
4738
4732
  log_id?: string | undefined;
4739
4733
  location_info?: {
4740
4734
  country_code: string;
4741
- country_code3: string;
4742
- country_name: string;
4743
4735
  city_name: string;
4744
4736
  latitude: string;
4745
4737
  longitude: string;
@@ -4775,8 +4767,6 @@ declare const logInsertSchema: z.ZodObject<{
4775
4767
  log_id?: string | undefined;
4776
4768
  location_info?: {
4777
4769
  country_code: string;
4778
- country_code3: string;
4779
- country_name: string;
4780
4770
  city_name: string;
4781
4771
  latitude: string;
4782
4772
  longitude: string;
@@ -4830,8 +4820,6 @@ declare const logSchema: z.ZodObject<{
4830
4820
  }>>;
4831
4821
  location_info: z.ZodOptional<z.ZodObject<{
4832
4822
  country_code: z.ZodString;
4833
- country_code3: z.ZodString;
4834
- country_name: z.ZodString;
4835
4823
  city_name: z.ZodString;
4836
4824
  latitude: z.ZodString;
4837
4825
  longitude: z.ZodString;
@@ -4839,8 +4827,6 @@ declare const logSchema: z.ZodObject<{
4839
4827
  continent_code: z.ZodString;
4840
4828
  }, "strip", z.ZodTypeAny, {
4841
4829
  country_code: string;
4842
- country_code3: string;
4843
- country_name: string;
4844
4830
  city_name: string;
4845
4831
  latitude: string;
4846
4832
  longitude: string;
@@ -4848,8 +4834,6 @@ declare const logSchema: z.ZodObject<{
4848
4834
  continent_code: string;
4849
4835
  }, {
4850
4836
  country_code: string;
4851
- country_code3: string;
4852
- country_name: string;
4853
4837
  city_name: string;
4854
4838
  latitude: string;
4855
4839
  longitude: string;
@@ -4885,8 +4869,6 @@ declare const logSchema: z.ZodObject<{
4885
4869
  } | undefined;
4886
4870
  location_info?: {
4887
4871
  country_code: string;
4888
- country_code3: string;
4889
- country_name: string;
4890
4872
  city_name: string;
4891
4873
  latitude: string;
4892
4874
  longitude: string;
@@ -4922,8 +4904,6 @@ declare const logSchema: z.ZodObject<{
4922
4904
  } | undefined;
4923
4905
  location_info?: {
4924
4906
  country_code: string;
4925
- country_code3: string;
4926
- country_name: string;
4927
4907
  city_name: string;
4928
4908
  latitude: string;
4929
4909
  longitude: string;
@@ -7684,8 +7664,6 @@ export interface InvitesAdapter {
7684
7664
  }
7685
7665
  export interface GeoInfo {
7686
7666
  country_code: string;
7687
- country_code3: string;
7688
- country_name: string;
7689
7667
  city_name: string;
7690
7668
  latitude: string;
7691
7669
  longitude: string;
@@ -7694,10 +7672,11 @@ export interface GeoInfo {
7694
7672
  }
7695
7673
  export interface GeoAdapter {
7696
7674
  /**
7697
- * Get geo information from the current request
7675
+ * Get geo information from request headers
7676
+ * @param headers - Record of HTTP headers (lowercase keys)
7698
7677
  * @returns Geo information or null if not available
7699
7678
  */
7700
- getGeoInfo(): Promise<GeoInfo | null>;
7679
+ getGeoInfo(headers: Record<string, string>): Promise<GeoInfo | null>;
7701
7680
  }
7702
7681
  export interface DataAdapters {
7703
7682
  branding: BrandingAdapter;
@@ -7838,6 +7817,7 @@ declare const sqlUserSchema: z.ZodObject<{
7838
7817
  user_metadata: z.ZodString;
7839
7818
  tenant_id: z.ZodString;
7840
7819
  user_id: z.ZodString;
7820
+ provider: z.ZodString;
7841
7821
  email: z.ZodOptional<z.ZodString>;
7842
7822
  login_count: z.ZodDefault<z.ZodNumber>;
7843
7823
  identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -7928,8 +7908,7 @@ declare const sqlUserSchema: z.ZodObject<{
7928
7908
  verify_email: z.ZodOptional<z.ZodBoolean>;
7929
7909
  last_ip: z.ZodOptional<z.ZodString>;
7930
7910
  last_login: z.ZodOptional<z.ZodString>;
7931
- provider: z.ZodDefault<z.ZodString>;
7932
- connection: z.ZodDefault<z.ZodString>;
7911
+ connection: z.ZodString;
7933
7912
  }, "strip", z.ZodTypeAny, {
7934
7913
  tenant_id: string;
7935
7914
  user_id: string;
@@ -7939,8 +7918,8 @@ declare const sqlUserSchema: z.ZodObject<{
7939
7918
  is_social: number;
7940
7919
  app_metadata: string;
7941
7920
  user_metadata: string;
7942
- login_count: number;
7943
7921
  provider: string;
7922
+ login_count: number;
7944
7923
  connection: string;
7945
7924
  name?: string | undefined;
7946
7925
  email?: string | undefined;
@@ -7984,6 +7963,8 @@ declare const sqlUserSchema: z.ZodObject<{
7984
7963
  is_social: number;
7985
7964
  app_metadata: string;
7986
7965
  user_metadata: string;
7966
+ provider: string;
7967
+ connection: string;
7987
7968
  name?: string | undefined;
7988
7969
  email?: string | undefined;
7989
7970
  login_count?: number | undefined;
@@ -8018,8 +7999,6 @@ declare const sqlUserSchema: z.ZodObject<{
8018
7999
  verify_email?: boolean | undefined;
8019
8000
  last_ip?: string | undefined;
8020
8001
  last_login?: string | undefined;
8021
- provider?: string | undefined;
8022
- connection?: string | undefined;
8023
8002
  }>;
8024
8003
  declare const sqlHookSchema: z.ZodObject<{
8025
8004
  tenant_id: z.ZodString;
@@ -8358,8 +8337,6 @@ declare const sqlLogSchema: z.ZodObject<{
8358
8337
  details: z.ZodOptional<z.ZodString>;
8359
8338
  session_connection: z.ZodOptional<z.ZodString>;
8360
8339
  country_code: z.ZodOptional<z.ZodString>;
8361
- country_code3: z.ZodOptional<z.ZodString>;
8362
- country_name: z.ZodOptional<z.ZodString>;
8363
8340
  city_name: z.ZodOptional<z.ZodString>;
8364
8341
  latitude: z.ZodOptional<z.ZodString>;
8365
8342
  longitude: z.ZodOptional<z.ZodString>;
@@ -8383,8 +8360,6 @@ declare const sqlLogSchema: z.ZodObject<{
8383
8360
  hostname: z.ZodOptional<z.ZodString>;
8384
8361
  location_info: z.ZodOptional<z.ZodObject<{
8385
8362
  country_code: z.ZodString;
8386
- country_code3: z.ZodString;
8387
- country_name: z.ZodString;
8388
8363
  city_name: z.ZodString;
8389
8364
  latitude: z.ZodString;
8390
8365
  longitude: z.ZodString;
@@ -8392,8 +8367,6 @@ declare const sqlLogSchema: z.ZodObject<{
8392
8367
  continent_code: z.ZodString;
8393
8368
  }, "strip", z.ZodTypeAny, {
8394
8369
  country_code: string;
8395
- country_code3: string;
8396
- country_name: string;
8397
8370
  city_name: string;
8398
8371
  latitude: string;
8399
8372
  longitude: string;
@@ -8401,8 +8374,6 @@ declare const sqlLogSchema: z.ZodObject<{
8401
8374
  continent_code: string;
8402
8375
  }, {
8403
8376
  country_code: string;
8404
- country_code3: string;
8405
- country_name: string;
8406
8377
  city_name: string;
8407
8378
  latitude: string;
8408
8379
  longitude: string;
@@ -8425,8 +8396,6 @@ declare const sqlLogSchema: z.ZodObject<{
8425
8396
  details?: string | undefined;
8426
8397
  session_connection?: string | undefined;
8427
8398
  country_code?: string | undefined;
8428
- country_code3?: string | undefined;
8429
- country_name?: string | undefined;
8430
8399
  city_name?: string | undefined;
8431
8400
  latitude?: string | undefined;
8432
8401
  longitude?: string | undefined;
@@ -8443,8 +8412,6 @@ declare const sqlLogSchema: z.ZodObject<{
8443
8412
  hostname?: string | undefined;
8444
8413
  location_info?: {
8445
8414
  country_code: string;
8446
- country_code3: string;
8447
- country_name: string;
8448
8415
  city_name: string;
8449
8416
  latitude: string;
8450
8417
  longitude: string;
@@ -8467,8 +8434,6 @@ declare const sqlLogSchema: z.ZodObject<{
8467
8434
  details?: string | undefined;
8468
8435
  session_connection?: string | undefined;
8469
8436
  country_code?: string | undefined;
8470
- country_code3?: string | undefined;
8471
- country_name?: string | undefined;
8472
8437
  city_name?: string | undefined;
8473
8438
  latitude?: string | undefined;
8474
8439
  longitude?: string | undefined;
@@ -8485,8 +8450,6 @@ declare const sqlLogSchema: z.ZodObject<{
8485
8450
  hostname?: string | undefined;
8486
8451
  location_info?: {
8487
8452
  country_code: string;
8488
- country_code3: string;
8489
- country_name: string;
8490
8453
  city_name: string;
8491
8454
  latitude: string;
8492
8455
  longitude: string;