@authhero/kysely-adapter 10.107.0 → 10.108.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.
@@ -1561,6 +1561,7 @@ declare const codeTypeSchema: z.ZodEnum<[
1561
1561
  "password_reset",
1562
1562
  "email_verification",
1563
1563
  "otp",
1564
+ "mfa_otp",
1564
1565
  "authorization_code",
1565
1566
  "oauth2_state",
1566
1567
  "ticket"
@@ -1574,6 +1575,7 @@ declare const codeInsertSchema: z.ZodObject<{
1574
1575
  "password_reset",
1575
1576
  "email_verification",
1576
1577
  "otp",
1578
+ "mfa_otp",
1577
1579
  "authorization_code",
1578
1580
  "oauth2_state",
1579
1581
  "ticket"
@@ -1585,6 +1587,7 @@ declare const codeInsertSchema: z.ZodObject<{
1585
1587
  "S256"
1586
1588
  ]>>;
1587
1589
  redirect_uri: z.ZodOptional<z.ZodString>;
1590
+ otp: z.ZodOptional<z.ZodString>;
1588
1591
  nonce: z.ZodOptional<z.ZodString>;
1589
1592
  state: z.ZodOptional<z.ZodString>;
1590
1593
  expires_at: z.ZodString;
@@ -1593,7 +1596,7 @@ declare const codeInsertSchema: z.ZodObject<{
1593
1596
  }, "strip", z.ZodTypeAny, {
1594
1597
  code_id: string;
1595
1598
  login_id: string;
1596
- code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1599
+ code_type: "password_reset" | "email_verification" | "otp" | "mfa_otp" | "authorization_code" | "oauth2_state" | "ticket";
1597
1600
  expires_at: string;
1598
1601
  connection_id?: string | undefined;
1599
1602
  user_id?: string | undefined;
@@ -1602,12 +1605,13 @@ declare const codeInsertSchema: z.ZodObject<{
1602
1605
  nonce?: string | undefined;
1603
1606
  code_challenge_method?: "S256" | "plain" | undefined;
1604
1607
  code_challenge?: string | undefined;
1608
+ otp?: string | undefined;
1605
1609
  code_verifier?: string | undefined;
1606
1610
  used_at?: string | undefined;
1607
1611
  }, {
1608
1612
  code_id: string;
1609
1613
  login_id: string;
1610
- code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1614
+ code_type: "password_reset" | "email_verification" | "otp" | "mfa_otp" | "authorization_code" | "oauth2_state" | "ticket";
1611
1615
  expires_at: string;
1612
1616
  connection_id?: string | undefined;
1613
1617
  user_id?: string | undefined;
@@ -1616,6 +1620,7 @@ declare const codeInsertSchema: z.ZodObject<{
1616
1620
  nonce?: string | undefined;
1617
1621
  code_challenge_method?: "S256" | "plain" | undefined;
1618
1622
  code_challenge?: string | undefined;
1623
+ otp?: string | undefined;
1619
1624
  code_verifier?: string | undefined;
1620
1625
  used_at?: string | undefined;
1621
1626
  }>;
@@ -1629,6 +1634,7 @@ declare const codeSchema: z.ZodObject<{
1629
1634
  "password_reset",
1630
1635
  "email_verification",
1631
1636
  "otp",
1637
+ "mfa_otp",
1632
1638
  "authorization_code",
1633
1639
  "oauth2_state",
1634
1640
  "ticket"
@@ -1640,6 +1646,7 @@ declare const codeSchema: z.ZodObject<{
1640
1646
  "S256"
1641
1647
  ]>>;
1642
1648
  redirect_uri: z.ZodOptional<z.ZodString>;
1649
+ otp: z.ZodOptional<z.ZodString>;
1643
1650
  nonce: z.ZodOptional<z.ZodString>;
1644
1651
  state: z.ZodOptional<z.ZodString>;
1645
1652
  expires_at: z.ZodString;
@@ -1649,7 +1656,7 @@ declare const codeSchema: z.ZodObject<{
1649
1656
  created_at: string;
1650
1657
  code_id: string;
1651
1658
  login_id: string;
1652
- code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1659
+ code_type: "password_reset" | "email_verification" | "otp" | "mfa_otp" | "authorization_code" | "oauth2_state" | "ticket";
1653
1660
  expires_at: string;
1654
1661
  connection_id?: string | undefined;
1655
1662
  user_id?: string | undefined;
@@ -1658,13 +1665,14 @@ declare const codeSchema: z.ZodObject<{
1658
1665
  nonce?: string | undefined;
1659
1666
  code_challenge_method?: "S256" | "plain" | undefined;
1660
1667
  code_challenge?: string | undefined;
1668
+ otp?: string | undefined;
1661
1669
  code_verifier?: string | undefined;
1662
1670
  used_at?: string | undefined;
1663
1671
  }, {
1664
1672
  created_at: string;
1665
1673
  code_id: string;
1666
1674
  login_id: string;
1667
- code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1675
+ code_type: "password_reset" | "email_verification" | "otp" | "mfa_otp" | "authorization_code" | "oauth2_state" | "ticket";
1668
1676
  expires_at: string;
1669
1677
  connection_id?: string | undefined;
1670
1678
  user_id?: string | undefined;
@@ -1673,6 +1681,7 @@ declare const codeSchema: z.ZodObject<{
1673
1681
  nonce?: string | undefined;
1674
1682
  code_challenge_method?: "S256" | "plain" | undefined;
1675
1683
  code_challenge?: string | undefined;
1684
+ otp?: string | undefined;
1676
1685
  code_verifier?: string | undefined;
1677
1686
  used_at?: string | undefined;
1678
1687
  }>;
@@ -4636,6 +4645,85 @@ declare const formInsertSchema: z.ZodObject<{
4636
4645
  id?: number | undefined;
4637
4646
  }[] | undefined;
4638
4647
  }>,
4648
+ z.ZodObject<{
4649
+ id: z.ZodString;
4650
+ order: z.ZodOptional<z.ZodNumber>;
4651
+ visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4652
+ } & {
4653
+ category: z.ZodOptional<z.ZodLiteral<"FIELD">>;
4654
+ label: z.ZodOptional<z.ZodString>;
4655
+ hint: z.ZodOptional<z.ZodString>;
4656
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
4657
+ id: z.ZodOptional<z.ZodNumber>;
4658
+ text: z.ZodString;
4659
+ type: z.ZodEnum<[
4660
+ "info",
4661
+ "error",
4662
+ "success",
4663
+ "warning"
4664
+ ]>;
4665
+ }, "strip", z.ZodTypeAny, {
4666
+ type: "info" | "error" | "success" | "warning";
4667
+ text: string;
4668
+ id?: number | undefined;
4669
+ }, {
4670
+ type: "info" | "error" | "success" | "warning";
4671
+ text: string;
4672
+ id?: number | undefined;
4673
+ }>, "many">>;
4674
+ required: z.ZodOptional<z.ZodBoolean>;
4675
+ sensitive: z.ZodOptional<z.ZodBoolean>;
4676
+ } & {
4677
+ type: z.ZodLiteral<"COUNTRY">;
4678
+ config: z.ZodOptional<z.ZodObject<{
4679
+ placeholder: z.ZodOptional<z.ZodString>;
4680
+ default_value: z.ZodOptional<z.ZodString>;
4681
+ }, "strip", z.ZodTypeAny, {
4682
+ placeholder?: string | undefined;
4683
+ default_value?: string | undefined;
4684
+ }, {
4685
+ placeholder?: string | undefined;
4686
+ default_value?: string | undefined;
4687
+ }>>;
4688
+ }, "strip", z.ZodTypeAny, {
4689
+ type: "COUNTRY";
4690
+ id: string;
4691
+ visible: boolean;
4692
+ required?: boolean | undefined;
4693
+ category?: "FIELD" | undefined;
4694
+ config?: {
4695
+ placeholder?: string | undefined;
4696
+ default_value?: string | undefined;
4697
+ } | undefined;
4698
+ sensitive?: boolean | undefined;
4699
+ label?: string | undefined;
4700
+ order?: number | undefined;
4701
+ hint?: string | undefined;
4702
+ messages?: {
4703
+ type: "info" | "error" | "success" | "warning";
4704
+ text: string;
4705
+ id?: number | undefined;
4706
+ }[] | undefined;
4707
+ }, {
4708
+ type: "COUNTRY";
4709
+ id: string;
4710
+ required?: boolean | undefined;
4711
+ category?: "FIELD" | undefined;
4712
+ config?: {
4713
+ placeholder?: string | undefined;
4714
+ default_value?: string | undefined;
4715
+ } | undefined;
4716
+ sensitive?: boolean | undefined;
4717
+ label?: string | undefined;
4718
+ order?: number | undefined;
4719
+ visible?: boolean | undefined;
4720
+ hint?: string | undefined;
4721
+ messages?: {
4722
+ type: "info" | "error" | "success" | "warning";
4723
+ text: string;
4724
+ id?: number | undefined;
4725
+ }[] | undefined;
4726
+ }>,
4639
4727
  z.ZodObject<{
4640
4728
  id: z.ZodString;
4641
4729
  order: z.ZodOptional<z.ZodNumber>;
@@ -6260,6 +6348,25 @@ declare const formInsertSchema: z.ZodObject<{
6260
6348
  text: string;
6261
6349
  id?: number | undefined;
6262
6350
  }[] | undefined;
6351
+ } | {
6352
+ type: "COUNTRY";
6353
+ id: string;
6354
+ visible: boolean;
6355
+ required?: boolean | undefined;
6356
+ category?: "FIELD" | undefined;
6357
+ config?: {
6358
+ placeholder?: string | undefined;
6359
+ default_value?: string | undefined;
6360
+ } | undefined;
6361
+ sensitive?: boolean | undefined;
6362
+ label?: string | undefined;
6363
+ order?: number | undefined;
6364
+ hint?: string | undefined;
6365
+ messages?: {
6366
+ type: "info" | "error" | "success" | "warning";
6367
+ text: string;
6368
+ id?: number | undefined;
6369
+ }[] | undefined;
6263
6370
  } | {
6264
6371
  type: "URL";
6265
6372
  id: string;
@@ -6719,6 +6826,25 @@ declare const formInsertSchema: z.ZodObject<{
6719
6826
  text: string;
6720
6827
  id?: number | undefined;
6721
6828
  }[] | undefined;
6829
+ } | {
6830
+ type: "COUNTRY";
6831
+ id: string;
6832
+ required?: boolean | undefined;
6833
+ category?: "FIELD" | undefined;
6834
+ config?: {
6835
+ placeholder?: string | undefined;
6836
+ default_value?: string | undefined;
6837
+ } | undefined;
6838
+ sensitive?: boolean | undefined;
6839
+ label?: string | undefined;
6840
+ order?: number | undefined;
6841
+ visible?: boolean | undefined;
6842
+ hint?: string | undefined;
6843
+ messages?: {
6844
+ type: "info" | "error" | "success" | "warning";
6845
+ text: string;
6846
+ id?: number | undefined;
6847
+ }[] | undefined;
6722
6848
  } | {
6723
6849
  type: "URL";
6724
6850
  id: string;
@@ -7182,6 +7308,25 @@ declare const formInsertSchema: z.ZodObject<{
7182
7308
  text: string;
7183
7309
  id?: number | undefined;
7184
7310
  }[] | undefined;
7311
+ } | {
7312
+ type: "COUNTRY";
7313
+ id: string;
7314
+ visible: boolean;
7315
+ required?: boolean | undefined;
7316
+ category?: "FIELD" | undefined;
7317
+ config?: {
7318
+ placeholder?: string | undefined;
7319
+ default_value?: string | undefined;
7320
+ } | undefined;
7321
+ sensitive?: boolean | undefined;
7322
+ label?: string | undefined;
7323
+ order?: number | undefined;
7324
+ hint?: string | undefined;
7325
+ messages?: {
7326
+ type: "info" | "error" | "success" | "warning";
7327
+ text: string;
7328
+ id?: number | undefined;
7329
+ }[] | undefined;
7185
7330
  } | {
7186
7331
  type: "URL";
7187
7332
  id: string;
@@ -7650,6 +7795,25 @@ declare const formInsertSchema: z.ZodObject<{
7650
7795
  text: string;
7651
7796
  id?: number | undefined;
7652
7797
  }[] | undefined;
7798
+ } | {
7799
+ type: "COUNTRY";
7800
+ id: string;
7801
+ required?: boolean | undefined;
7802
+ category?: "FIELD" | undefined;
7803
+ config?: {
7804
+ placeholder?: string | undefined;
7805
+ default_value?: string | undefined;
7806
+ } | undefined;
7807
+ sensitive?: boolean | undefined;
7808
+ label?: string | undefined;
7809
+ order?: number | undefined;
7810
+ visible?: boolean | undefined;
7811
+ hint?: string | undefined;
7812
+ messages?: {
7813
+ type: "info" | "error" | "success" | "warning";
7814
+ text: string;
7815
+ id?: number | undefined;
7816
+ }[] | undefined;
7653
7817
  } | {
7654
7818
  type: "URL";
7655
7819
  id: string;
@@ -8285,6 +8449,25 @@ declare const formInsertSchema: z.ZodObject<{
8285
8449
  text: string;
8286
8450
  id?: number | undefined;
8287
8451
  }[] | undefined;
8452
+ } | {
8453
+ type: "COUNTRY";
8454
+ id: string;
8455
+ visible: boolean;
8456
+ required?: boolean | undefined;
8457
+ category?: "FIELD" | undefined;
8458
+ config?: {
8459
+ placeholder?: string | undefined;
8460
+ default_value?: string | undefined;
8461
+ } | undefined;
8462
+ sensitive?: boolean | undefined;
8463
+ label?: string | undefined;
8464
+ order?: number | undefined;
8465
+ hint?: string | undefined;
8466
+ messages?: {
8467
+ type: "info" | "error" | "success" | "warning";
8468
+ text: string;
8469
+ id?: number | undefined;
8470
+ }[] | undefined;
8288
8471
  } | {
8289
8472
  type: "URL";
8290
8473
  id: string;
@@ -8826,6 +9009,25 @@ declare const formInsertSchema: z.ZodObject<{
8826
9009
  text: string;
8827
9010
  id?: number | undefined;
8828
9011
  }[] | undefined;
9012
+ } | {
9013
+ type: "COUNTRY";
9014
+ id: string;
9015
+ required?: boolean | undefined;
9016
+ category?: "FIELD" | undefined;
9017
+ config?: {
9018
+ placeholder?: string | undefined;
9019
+ default_value?: string | undefined;
9020
+ } | undefined;
9021
+ sensitive?: boolean | undefined;
9022
+ label?: string | undefined;
9023
+ order?: number | undefined;
9024
+ visible?: boolean | undefined;
9025
+ hint?: string | undefined;
9026
+ messages?: {
9027
+ type: "info" | "error" | "success" | "warning";
9028
+ text: string;
9029
+ id?: number | undefined;
9030
+ }[] | undefined;
8829
9031
  } | {
8830
9032
  type: "URL";
8831
9033
  id: string;
@@ -9797,6 +9999,85 @@ declare const formSchema: z.ZodObject<{
9797
9999
  id?: number | undefined;
9798
10000
  }[] | undefined;
9799
10001
  }>,
10002
+ z.ZodObject<{
10003
+ id: z.ZodString;
10004
+ order: z.ZodOptional<z.ZodNumber>;
10005
+ visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10006
+ } & {
10007
+ category: z.ZodOptional<z.ZodLiteral<"FIELD">>;
10008
+ label: z.ZodOptional<z.ZodString>;
10009
+ hint: z.ZodOptional<z.ZodString>;
10010
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
10011
+ id: z.ZodOptional<z.ZodNumber>;
10012
+ text: z.ZodString;
10013
+ type: z.ZodEnum<[
10014
+ "info",
10015
+ "error",
10016
+ "success",
10017
+ "warning"
10018
+ ]>;
10019
+ }, "strip", z.ZodTypeAny, {
10020
+ type: "info" | "error" | "success" | "warning";
10021
+ text: string;
10022
+ id?: number | undefined;
10023
+ }, {
10024
+ type: "info" | "error" | "success" | "warning";
10025
+ text: string;
10026
+ id?: number | undefined;
10027
+ }>, "many">>;
10028
+ required: z.ZodOptional<z.ZodBoolean>;
10029
+ sensitive: z.ZodOptional<z.ZodBoolean>;
10030
+ } & {
10031
+ type: z.ZodLiteral<"COUNTRY">;
10032
+ config: z.ZodOptional<z.ZodObject<{
10033
+ placeholder: z.ZodOptional<z.ZodString>;
10034
+ default_value: z.ZodOptional<z.ZodString>;
10035
+ }, "strip", z.ZodTypeAny, {
10036
+ placeholder?: string | undefined;
10037
+ default_value?: string | undefined;
10038
+ }, {
10039
+ placeholder?: string | undefined;
10040
+ default_value?: string | undefined;
10041
+ }>>;
10042
+ }, "strip", z.ZodTypeAny, {
10043
+ type: "COUNTRY";
10044
+ id: string;
10045
+ visible: boolean;
10046
+ required?: boolean | undefined;
10047
+ category?: "FIELD" | undefined;
10048
+ config?: {
10049
+ placeholder?: string | undefined;
10050
+ default_value?: string | undefined;
10051
+ } | undefined;
10052
+ sensitive?: boolean | undefined;
10053
+ label?: string | undefined;
10054
+ order?: number | undefined;
10055
+ hint?: string | undefined;
10056
+ messages?: {
10057
+ type: "info" | "error" | "success" | "warning";
10058
+ text: string;
10059
+ id?: number | undefined;
10060
+ }[] | undefined;
10061
+ }, {
10062
+ type: "COUNTRY";
10063
+ id: string;
10064
+ required?: boolean | undefined;
10065
+ category?: "FIELD" | undefined;
10066
+ config?: {
10067
+ placeholder?: string | undefined;
10068
+ default_value?: string | undefined;
10069
+ } | undefined;
10070
+ sensitive?: boolean | undefined;
10071
+ label?: string | undefined;
10072
+ order?: number | undefined;
10073
+ visible?: boolean | undefined;
10074
+ hint?: string | undefined;
10075
+ messages?: {
10076
+ type: "info" | "error" | "success" | "warning";
10077
+ text: string;
10078
+ id?: number | undefined;
10079
+ }[] | undefined;
10080
+ }>,
9800
10081
  z.ZodObject<{
9801
10082
  id: z.ZodString;
9802
10083
  order: z.ZodOptional<z.ZodNumber>;
@@ -11421,6 +11702,25 @@ declare const formSchema: z.ZodObject<{
11421
11702
  text: string;
11422
11703
  id?: number | undefined;
11423
11704
  }[] | undefined;
11705
+ } | {
11706
+ type: "COUNTRY";
11707
+ id: string;
11708
+ visible: boolean;
11709
+ required?: boolean | undefined;
11710
+ category?: "FIELD" | undefined;
11711
+ config?: {
11712
+ placeholder?: string | undefined;
11713
+ default_value?: string | undefined;
11714
+ } | undefined;
11715
+ sensitive?: boolean | undefined;
11716
+ label?: string | undefined;
11717
+ order?: number | undefined;
11718
+ hint?: string | undefined;
11719
+ messages?: {
11720
+ type: "info" | "error" | "success" | "warning";
11721
+ text: string;
11722
+ id?: number | undefined;
11723
+ }[] | undefined;
11424
11724
  } | {
11425
11725
  type: "URL";
11426
11726
  id: string;
@@ -11880,6 +12180,25 @@ declare const formSchema: z.ZodObject<{
11880
12180
  text: string;
11881
12181
  id?: number | undefined;
11882
12182
  }[] | undefined;
12183
+ } | {
12184
+ type: "COUNTRY";
12185
+ id: string;
12186
+ required?: boolean | undefined;
12187
+ category?: "FIELD" | undefined;
12188
+ config?: {
12189
+ placeholder?: string | undefined;
12190
+ default_value?: string | undefined;
12191
+ } | undefined;
12192
+ sensitive?: boolean | undefined;
12193
+ label?: string | undefined;
12194
+ order?: number | undefined;
12195
+ visible?: boolean | undefined;
12196
+ hint?: string | undefined;
12197
+ messages?: {
12198
+ type: "info" | "error" | "success" | "warning";
12199
+ text: string;
12200
+ id?: number | undefined;
12201
+ }[] | undefined;
11883
12202
  } | {
11884
12203
  type: "URL";
11885
12204
  id: string;
@@ -12343,6 +12662,25 @@ declare const formSchema: z.ZodObject<{
12343
12662
  text: string;
12344
12663
  id?: number | undefined;
12345
12664
  }[] | undefined;
12665
+ } | {
12666
+ type: "COUNTRY";
12667
+ id: string;
12668
+ visible: boolean;
12669
+ required?: boolean | undefined;
12670
+ category?: "FIELD" | undefined;
12671
+ config?: {
12672
+ placeholder?: string | undefined;
12673
+ default_value?: string | undefined;
12674
+ } | undefined;
12675
+ sensitive?: boolean | undefined;
12676
+ label?: string | undefined;
12677
+ order?: number | undefined;
12678
+ hint?: string | undefined;
12679
+ messages?: {
12680
+ type: "info" | "error" | "success" | "warning";
12681
+ text: string;
12682
+ id?: number | undefined;
12683
+ }[] | undefined;
12346
12684
  } | {
12347
12685
  type: "URL";
12348
12686
  id: string;
@@ -12811,6 +13149,25 @@ declare const formSchema: z.ZodObject<{
12811
13149
  text: string;
12812
13150
  id?: number | undefined;
12813
13151
  }[] | undefined;
13152
+ } | {
13153
+ type: "COUNTRY";
13154
+ id: string;
13155
+ required?: boolean | undefined;
13156
+ category?: "FIELD" | undefined;
13157
+ config?: {
13158
+ placeholder?: string | undefined;
13159
+ default_value?: string | undefined;
13160
+ } | undefined;
13161
+ sensitive?: boolean | undefined;
13162
+ label?: string | undefined;
13163
+ order?: number | undefined;
13164
+ visible?: boolean | undefined;
13165
+ hint?: string | undefined;
13166
+ messages?: {
13167
+ type: "info" | "error" | "success" | "warning";
13168
+ text: string;
13169
+ id?: number | undefined;
13170
+ }[] | undefined;
12814
13171
  } | {
12815
13172
  type: "URL";
12816
13173
  id: string;
@@ -13451,6 +13808,25 @@ declare const formSchema: z.ZodObject<{
13451
13808
  text: string;
13452
13809
  id?: number | undefined;
13453
13810
  }[] | undefined;
13811
+ } | {
13812
+ type: "COUNTRY";
13813
+ id: string;
13814
+ visible: boolean;
13815
+ required?: boolean | undefined;
13816
+ category?: "FIELD" | undefined;
13817
+ config?: {
13818
+ placeholder?: string | undefined;
13819
+ default_value?: string | undefined;
13820
+ } | undefined;
13821
+ sensitive?: boolean | undefined;
13822
+ label?: string | undefined;
13823
+ order?: number | undefined;
13824
+ hint?: string | undefined;
13825
+ messages?: {
13826
+ type: "info" | "error" | "success" | "warning";
13827
+ text: string;
13828
+ id?: number | undefined;
13829
+ }[] | undefined;
13454
13830
  } | {
13455
13831
  type: "URL";
13456
13832
  id: string;
@@ -13995,6 +14371,25 @@ declare const formSchema: z.ZodObject<{
13995
14371
  text: string;
13996
14372
  id?: number | undefined;
13997
14373
  }[] | undefined;
14374
+ } | {
14375
+ type: "COUNTRY";
14376
+ id: string;
14377
+ required?: boolean | undefined;
14378
+ category?: "FIELD" | undefined;
14379
+ config?: {
14380
+ placeholder?: string | undefined;
14381
+ default_value?: string | undefined;
14382
+ } | undefined;
14383
+ sensitive?: boolean | undefined;
14384
+ label?: string | undefined;
14385
+ order?: number | undefined;
14386
+ visible?: boolean | undefined;
14387
+ hint?: string | undefined;
14388
+ messages?: {
14389
+ type: "info" | "error" | "success" | "warning";
14390
+ text: string;
14391
+ id?: number | undefined;
14392
+ }[] | undefined;
13998
14393
  } | {
13999
14394
  type: "URL";
14000
14395
  id: string;
@@ -14392,6 +14787,8 @@ declare enum LoginSessionState {
14392
14787
  AUTHENTICATED = "authenticated",
14393
14788
  /** Waiting for email verification */
14394
14789
  AWAITING_EMAIL_VERIFICATION = "awaiting_email_verification",
14790
+ /** Waiting for MFA verification */
14791
+ AWAITING_MFA = "awaiting_mfa",
14395
14792
  /** Waiting for hook/flow completion (form, page redirect) */
14396
14793
  AWAITING_HOOK = "awaiting_hook",
14397
14794
  /** Waiting for user to complete action on continuation page (change-email, account, etc.) */
@@ -15457,6 +15854,10 @@ declare const tenantSchema: z.ZodObject<{
15457
15854
  pushed_authorization_requests_supported: z.ZodOptional<z.ZodBoolean>;
15458
15855
  authorization_response_iss_parameter_supported: z.ZodOptional<z.ZodBoolean>;
15459
15856
  mfa: z.ZodOptional<z.ZodObject<{
15857
+ policy: z.ZodOptional<z.ZodDefault<z.ZodEnum<[
15858
+ "never",
15859
+ "always"
15860
+ ]>>>;
15460
15861
  factors: z.ZodOptional<z.ZodObject<{
15461
15862
  sms: z.ZodDefault<z.ZodBoolean>;
15462
15863
  otp: z.ZodDefault<z.ZodBoolean>;
@@ -15521,6 +15922,7 @@ declare const tenantSchema: z.ZodObject<{
15521
15922
  message?: string | undefined;
15522
15923
  }>>;
15523
15924
  }, "strip", z.ZodTypeAny, {
15925
+ policy?: "never" | "always" | undefined;
15524
15926
  factors?: {
15525
15927
  email: boolean;
15526
15928
  otp: boolean;
@@ -15544,6 +15946,7 @@ declare const tenantSchema: z.ZodObject<{
15544
15946
  message?: string | undefined;
15545
15947
  } | undefined;
15546
15948
  }, {
15949
+ policy?: "never" | "always" | undefined;
15547
15950
  factors?: {
15548
15951
  email?: boolean | undefined;
15549
15952
  otp?: boolean | undefined;
@@ -15671,6 +16074,7 @@ declare const tenantSchema: z.ZodObject<{
15671
16074
  pushed_authorization_requests_supported?: boolean | undefined;
15672
16075
  authorization_response_iss_parameter_supported?: boolean | undefined;
15673
16076
  mfa?: {
16077
+ policy?: "never" | "always" | undefined;
15674
16078
  factors?: {
15675
16079
  email: boolean;
15676
16080
  otp: boolean;
@@ -15796,6 +16200,7 @@ declare const tenantSchema: z.ZodObject<{
15796
16200
  pushed_authorization_requests_supported?: boolean | undefined;
15797
16201
  authorization_response_iss_parameter_supported?: boolean | undefined;
15798
16202
  mfa?: {
16203
+ policy?: "never" | "always" | undefined;
15799
16204
  factors?: {
15800
16205
  email?: boolean | undefined;
15801
16206
  otp?: boolean | undefined;
@@ -17684,7 +18089,6 @@ declare const promptScreenSchema: z.ZodEnum<[
17684
18089
  "mfa-voice",
17685
18090
  "mfa-phone",
17686
18091
  "mfa-webauthn",
17687
- "mfa-sms",
17688
18092
  "mfa-email",
17689
18093
  "mfa-recovery-code",
17690
18094
  "status",
@@ -17702,6 +18106,97 @@ declare const promptScreenSchema: z.ZodEnum<[
17702
18106
  export type PromptScreen = z.infer<typeof promptScreenSchema>;
17703
18107
  declare const customTextSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
17704
18108
  export type CustomText = z.infer<typeof customTextSchema>;
18109
+ declare const mfaEnrollmentInsertSchema: z.ZodEffects<z.ZodObject<{
18110
+ user_id: z.ZodString;
18111
+ type: z.ZodEnum<[
18112
+ "phone",
18113
+ "totp",
18114
+ "email",
18115
+ "push",
18116
+ "webauthn"
18117
+ ]>;
18118
+ phone_number: z.ZodOptional<z.ZodString>;
18119
+ totp_secret: z.ZodOptional<z.ZodString>;
18120
+ confirmed: z.ZodDefault<z.ZodBoolean>;
18121
+ }, "strip", z.ZodTypeAny, {
18122
+ type: "push" | "email" | "phone" | "totp" | "webauthn";
18123
+ user_id: string;
18124
+ confirmed: boolean;
18125
+ phone_number?: string | undefined;
18126
+ totp_secret?: string | undefined;
18127
+ }, {
18128
+ type: "push" | "email" | "phone" | "totp" | "webauthn";
18129
+ user_id: string;
18130
+ phone_number?: string | undefined;
18131
+ totp_secret?: string | undefined;
18132
+ confirmed?: boolean | undefined;
18133
+ }>, {
18134
+ type: "push" | "email" | "phone" | "totp" | "webauthn";
18135
+ user_id: string;
18136
+ confirmed: boolean;
18137
+ phone_number?: string | undefined;
18138
+ totp_secret?: string | undefined;
18139
+ }, {
18140
+ type: "push" | "email" | "phone" | "totp" | "webauthn";
18141
+ user_id: string;
18142
+ phone_number?: string | undefined;
18143
+ totp_secret?: string | undefined;
18144
+ confirmed?: boolean | undefined;
18145
+ }>;
18146
+ export type MfaEnrollmentInsert = z.infer<typeof mfaEnrollmentInsertSchema>;
18147
+ declare const mfaEnrollmentSchema: z.ZodEffects<z.ZodObject<{
18148
+ id: z.ZodString;
18149
+ created_at: z.ZodString;
18150
+ updated_at: z.ZodString;
18151
+ user_id: z.ZodString;
18152
+ type: z.ZodEnum<[
18153
+ "phone",
18154
+ "totp",
18155
+ "email",
18156
+ "push",
18157
+ "webauthn"
18158
+ ]>;
18159
+ phone_number: z.ZodOptional<z.ZodString>;
18160
+ totp_secret: z.ZodOptional<z.ZodString>;
18161
+ confirmed: z.ZodDefault<z.ZodBoolean>;
18162
+ }, "strip", z.ZodTypeAny, {
18163
+ created_at: string;
18164
+ updated_at: string;
18165
+ type: "push" | "email" | "phone" | "totp" | "webauthn";
18166
+ id: string;
18167
+ user_id: string;
18168
+ confirmed: boolean;
18169
+ phone_number?: string | undefined;
18170
+ totp_secret?: string | undefined;
18171
+ }, {
18172
+ created_at: string;
18173
+ updated_at: string;
18174
+ type: "push" | "email" | "phone" | "totp" | "webauthn";
18175
+ id: string;
18176
+ user_id: string;
18177
+ phone_number?: string | undefined;
18178
+ totp_secret?: string | undefined;
18179
+ confirmed?: boolean | undefined;
18180
+ }>, {
18181
+ created_at: string;
18182
+ updated_at: string;
18183
+ type: "push" | "email" | "phone" | "totp" | "webauthn";
18184
+ id: string;
18185
+ user_id: string;
18186
+ confirmed: boolean;
18187
+ phone_number?: string | undefined;
18188
+ totp_secret?: string | undefined;
18189
+ }, {
18190
+ created_at: string;
18191
+ updated_at: string;
18192
+ type: "push" | "email" | "phone" | "totp" | "webauthn";
18193
+ id: string;
18194
+ user_id: string;
18195
+ phone_number?: string | undefined;
18196
+ totp_secret?: string | undefined;
18197
+ confirmed?: boolean | undefined;
18198
+ }>;
18199
+ export type MfaEnrollment = z.infer<typeof mfaEnrollmentSchema>;
17705
18200
  export interface ListFlowsResponse extends Totals {
17706
18201
  flows: Flow[];
17707
18202
  }
@@ -17809,6 +18304,11 @@ export interface CodesAdapter {
17809
18304
  get: (tenant_id: string, code_id: string, type: CodeType) => Promise<Code | null>;
17810
18305
  list: (tenant_id: string, params?: ListParams) => Promise<ListCodesResponse>;
17811
18306
  used: (tenant_id: string, code_id: string) => Promise<boolean>;
18307
+ /**
18308
+ * Atomically mark a code as used only if it has not been used yet.
18309
+ * Returns true if the code was successfully consumed (was unused), false otherwise.
18310
+ */
18311
+ consume: (tenant_id: string, code_id: string) => Promise<boolean>;
17812
18312
  remove: (tenant_id: string, code_id: string) => Promise<boolean>;
17813
18313
  }
17814
18314
  export interface PasswordsAdapter {
@@ -18039,6 +18539,13 @@ export interface GeoAdapter {
18039
18539
  */
18040
18540
  getGeoInfo(headers: Record<string, string>): Promise<GeoInfo | null>;
18041
18541
  }
18542
+ export interface MfaEnrollmentsAdapter {
18543
+ create: (tenant_id: string, enrollment: MfaEnrollmentInsert) => Promise<MfaEnrollment>;
18544
+ get: (tenant_id: string, enrollment_id: string) => Promise<MfaEnrollment | null>;
18545
+ list: (tenant_id: string, user_id: string) => Promise<MfaEnrollment[]>;
18546
+ update: (tenant_id: string, enrollment_id: string, data: Partial<MfaEnrollmentInsert>) => Promise<MfaEnrollment>;
18547
+ remove: (tenant_id: string, enrollment_id: string) => Promise<boolean>;
18548
+ }
18042
18549
  export interface StatsListParams {
18043
18550
  from?: string;
18044
18551
  to?: string;
@@ -18125,6 +18632,7 @@ export interface DataAdapters {
18125
18632
  users: UserDataAdapter;
18126
18633
  userRoles: UserRolesAdapter;
18127
18634
  organizations: OrganizationsAdapter;
18635
+ mfaEnrollments: MfaEnrollmentsAdapter;
18128
18636
  userOrganizations: UserOrganizationsAdapter;
18129
18637
  /**
18130
18638
  * Optional session cleanup function.
@@ -19474,6 +19982,10 @@ declare const sqlTenantSchema: z.ZodObject<{
19474
19982
  pushed_authorization_requests_supported: z.ZodOptional<z.ZodBoolean>;
19475
19983
  authorization_response_iss_parameter_supported: z.ZodOptional<z.ZodBoolean>;
19476
19984
  mfa: z.ZodOptional<z.ZodObject<{
19985
+ policy: z.ZodOptional<z.ZodDefault<z.ZodEnum<[
19986
+ "never",
19987
+ "always"
19988
+ ]>>>;
19477
19989
  factors: z.ZodOptional<z.ZodObject<{
19478
19990
  sms: z.ZodDefault<z.ZodBoolean>;
19479
19991
  otp: z.ZodDefault<z.ZodBoolean>;
@@ -19538,6 +20050,7 @@ declare const sqlTenantSchema: z.ZodObject<{
19538
20050
  message?: string | undefined;
19539
20051
  }>>;
19540
20052
  }, "strip", z.ZodTypeAny, {
20053
+ policy?: "never" | "always" | undefined;
19541
20054
  factors?: {
19542
20055
  email: boolean;
19543
20056
  otp: boolean;
@@ -19561,6 +20074,7 @@ declare const sqlTenantSchema: z.ZodObject<{
19561
20074
  message?: string | undefined;
19562
20075
  } | undefined;
19563
20076
  }, {
20077
+ policy?: "never" | "always" | undefined;
19564
20078
  factors?: {
19565
20079
  email?: boolean | undefined;
19566
20080
  otp?: boolean | undefined;
@@ -19688,6 +20202,7 @@ declare const sqlTenantSchema: z.ZodObject<{
19688
20202
  pushed_authorization_requests_supported?: boolean | undefined;
19689
20203
  authorization_response_iss_parameter_supported?: boolean | undefined;
19690
20204
  mfa?: {
20205
+ policy?: "never" | "always" | undefined;
19691
20206
  factors?: {
19692
20207
  email: boolean;
19693
20208
  otp: boolean;
@@ -19813,6 +20328,7 @@ declare const sqlTenantSchema: z.ZodObject<{
19813
20328
  pushed_authorization_requests_supported?: boolean | undefined;
19814
20329
  authorization_response_iss_parameter_supported?: boolean | undefined;
19815
20330
  mfa?: {
20331
+ policy?: "never" | "always" | undefined;
19816
20332
  factors?: {
19817
20333
  email?: boolean | undefined;
19818
20334
  otp?: boolean | undefined;
@@ -20246,6 +20762,37 @@ declare const sqlClientSchema: z.ZodObject<{
20246
20762
  compliance_level?: "none" | "fapi1_adv_pkj_par" | "fapi1_adv_mtls_par" | "fapi2_sp_pkj_mtls" | "fapi2_sp_mtls_mtls" | undefined;
20247
20763
  par_request_expiry?: number | undefined;
20248
20764
  }>;
20765
+ declare const sqlMfaEnrollmentSchema: z.ZodObject<{
20766
+ id: z.ZodString;
20767
+ tenant_id: z.ZodString;
20768
+ user_id: z.ZodString;
20769
+ type: z.ZodString;
20770
+ phone_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
20771
+ totp_secret: z.ZodNullable<z.ZodOptional<z.ZodString>>;
20772
+ confirmed: z.ZodNumber;
20773
+ created_at_ts: z.ZodNumber;
20774
+ updated_at_ts: z.ZodNumber;
20775
+ }, "strip", z.ZodTypeAny, {
20776
+ type: string;
20777
+ tenant_id: string;
20778
+ user_id: string;
20779
+ created_at_ts: number;
20780
+ updated_at_ts: number;
20781
+ id: string;
20782
+ confirmed: number;
20783
+ phone_number?: string | null | undefined;
20784
+ totp_secret?: string | null | undefined;
20785
+ }, {
20786
+ type: string;
20787
+ tenant_id: string;
20788
+ user_id: string;
20789
+ created_at_ts: number;
20790
+ updated_at_ts: number;
20791
+ id: string;
20792
+ confirmed: number;
20793
+ phone_number?: string | null | undefined;
20794
+ totp_secret?: string | null | undefined;
20795
+ }>;
20249
20796
  export interface Database {
20250
20797
  flows: z.infer<typeof sqlFlowSchema>;
20251
20798
  branding: z.infer<typeof sqlBrandingSchema>;
@@ -20281,6 +20828,7 @@ export interface Database {
20281
20828
  invites: z.infer<typeof sqlInviteSchema>;
20282
20829
  universal_login_templates: z.infer<typeof sqlUniversalLoginTemplateSchema>;
20283
20830
  custom_text: z.infer<typeof sqlCustomTextSchema>;
20831
+ mfa_enrollments: z.infer<typeof sqlMfaEnrollmentSchema>;
20284
20832
  }
20285
20833
  export declare function migrateToLatest(db: Kysely<Database>, debug?: boolean): Promise<void>;
20286
20834
  export declare function migrateDown(db: Kysely<Database>): Promise<void>;