@authhero/kysely-adapter 0.4.3 → 0.5.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.
@@ -654,6 +654,148 @@ declare const hookSchema: z.ZodObject<z.objectUtil.extendShape<{
654
654
  enabled?: boolean | undefined;
655
655
  }>;
656
656
  export type Hook = z.infer<typeof hookSchema>;
657
+ declare const LogType: z.ZodEnum<[
658
+ "sapi",
659
+ "ssa",
660
+ "fsa",
661
+ "ss",
662
+ "ssa",
663
+ "fs",
664
+ "s",
665
+ "f",
666
+ "fp",
667
+ "slo",
668
+ "scoa",
669
+ "fcoa",
670
+ "seccft",
671
+ "cls",
672
+ "seacft",
673
+ "serft"
674
+ ]>;
675
+ export type LogType$1 = z.infer<typeof LogType>;
676
+ declare const logSchema: z.ZodObject<{
677
+ type: z.ZodEnum<[
678
+ "sapi",
679
+ "ssa",
680
+ "fsa",
681
+ "ss",
682
+ "ssa",
683
+ "fs",
684
+ "s",
685
+ "f",
686
+ "fp",
687
+ "slo",
688
+ "scoa",
689
+ "fcoa",
690
+ "seccft",
691
+ "cls",
692
+ "seacft",
693
+ "serft"
694
+ ]>;
695
+ date: z.ZodString;
696
+ description: z.ZodOptional<z.ZodString>;
697
+ log_id: z.ZodOptional<z.ZodString>;
698
+ _id: z.ZodOptional<z.ZodString>;
699
+ ip: z.ZodString;
700
+ user_agent: z.ZodString;
701
+ details: z.ZodOptional<z.ZodAny>;
702
+ isMobile: z.ZodBoolean;
703
+ user_id: z.ZodOptional<z.ZodString>;
704
+ user_name: z.ZodOptional<z.ZodString>;
705
+ connection: z.ZodOptional<z.ZodString>;
706
+ connection_id: z.ZodOptional<z.ZodString>;
707
+ client_id: z.ZodOptional<z.ZodString>;
708
+ client_name: z.ZodOptional<z.ZodString>;
709
+ audience: z.ZodOptional<z.ZodString>;
710
+ scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
711
+ strategy: z.ZodOptional<z.ZodString>;
712
+ strategy_type: z.ZodOptional<z.ZodString>;
713
+ hostname: z.ZodOptional<z.ZodString>;
714
+ auth0_client: z.ZodOptional<z.ZodObject<{
715
+ name: z.ZodString;
716
+ version: z.ZodString;
717
+ env: z.ZodOptional<z.ZodObject<{
718
+ node: z.ZodOptional<z.ZodString>;
719
+ }, "strip", z.ZodTypeAny, {
720
+ node?: string | undefined;
721
+ }, {
722
+ node?: string | undefined;
723
+ }>>;
724
+ }, "strip", z.ZodTypeAny, {
725
+ name: string;
726
+ version: string;
727
+ env?: {
728
+ node?: string | undefined;
729
+ } | undefined;
730
+ }, {
731
+ name: string;
732
+ version: string;
733
+ env?: {
734
+ node?: string | undefined;
735
+ } | undefined;
736
+ }>>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ type: "sapi" | "ssa" | "fsa" | "ss" | "fs" | "s" | "f" | "fp" | "slo" | "scoa" | "fcoa" | "seacft" | "serft" | "cls" | "seccft";
739
+ date: string;
740
+ ip: string;
741
+ user_agent: string;
742
+ isMobile: boolean;
743
+ description?: string | undefined;
744
+ connection?: string | undefined;
745
+ user_id?: string | undefined;
746
+ client_id?: string | undefined;
747
+ audience?: string | undefined;
748
+ scope?: string[] | undefined;
749
+ log_id?: string | undefined;
750
+ _id?: string | undefined;
751
+ details?: any;
752
+ user_name?: string | undefined;
753
+ connection_id?: string | undefined;
754
+ client_name?: string | undefined;
755
+ strategy?: string | undefined;
756
+ strategy_type?: string | undefined;
757
+ hostname?: string | undefined;
758
+ auth0_client?: {
759
+ name: string;
760
+ version: string;
761
+ env?: {
762
+ node?: string | undefined;
763
+ } | undefined;
764
+ } | undefined;
765
+ }, {
766
+ type: "sapi" | "ssa" | "fsa" | "ss" | "fs" | "s" | "f" | "fp" | "slo" | "scoa" | "fcoa" | "seacft" | "serft" | "cls" | "seccft";
767
+ date: string;
768
+ ip: string;
769
+ user_agent: string;
770
+ isMobile: boolean;
771
+ description?: string | undefined;
772
+ connection?: string | undefined;
773
+ user_id?: string | undefined;
774
+ client_id?: string | undefined;
775
+ audience?: string | undefined;
776
+ scope?: string[] | undefined;
777
+ log_id?: string | undefined;
778
+ _id?: string | undefined;
779
+ details?: any;
780
+ user_name?: string | undefined;
781
+ connection_id?: string | undefined;
782
+ client_name?: string | undefined;
783
+ strategy?: string | undefined;
784
+ strategy_type?: string | undefined;
785
+ hostname?: string | undefined;
786
+ auth0_client?: {
787
+ name: string;
788
+ version: string;
789
+ env?: {
790
+ node?: string | undefined;
791
+ } | undefined;
792
+ } | undefined;
793
+ }>;
794
+ export type Log = z.infer<typeof logSchema>;
795
+ export type LogsResponse = Log & {
796
+ log_id: string;
797
+ _id: string;
798
+ };
657
799
  declare const otpInsertSchema: z.ZodObject<{
658
800
  id: z.ZodString;
659
801
  email: z.ZodString;
@@ -1142,148 +1284,6 @@ declare const universalLoginSessionSchema: z.ZodObject<{
1142
1284
  auth0Client?: string | undefined;
1143
1285
  }>;
1144
1286
  export type UniversalLoginSession = z.infer<typeof universalLoginSessionSchema>;
1145
- declare const LogType: z.ZodEnum<[
1146
- "sapi",
1147
- "ssa",
1148
- "fsa",
1149
- "ss",
1150
- "ssa",
1151
- "fs",
1152
- "s",
1153
- "f",
1154
- "fp",
1155
- "slo",
1156
- "scoa",
1157
- "fcoa",
1158
- "seccft",
1159
- "cls",
1160
- "seacft",
1161
- "serft"
1162
- ]>;
1163
- export type LogType$1 = z.infer<typeof LogType>;
1164
- declare const logSchema: z.ZodObject<{
1165
- type: z.ZodEnum<[
1166
- "sapi",
1167
- "ssa",
1168
- "fsa",
1169
- "ss",
1170
- "ssa",
1171
- "fs",
1172
- "s",
1173
- "f",
1174
- "fp",
1175
- "slo",
1176
- "scoa",
1177
- "fcoa",
1178
- "seccft",
1179
- "cls",
1180
- "seacft",
1181
- "serft"
1182
- ]>;
1183
- date: z.ZodString;
1184
- description: z.ZodOptional<z.ZodString>;
1185
- log_id: z.ZodOptional<z.ZodString>;
1186
- _id: z.ZodOptional<z.ZodString>;
1187
- ip: z.ZodString;
1188
- user_agent: z.ZodString;
1189
- details: z.ZodOptional<z.ZodAny>;
1190
- isMobile: z.ZodBoolean;
1191
- user_id: z.ZodOptional<z.ZodString>;
1192
- user_name: z.ZodOptional<z.ZodString>;
1193
- connection: z.ZodOptional<z.ZodString>;
1194
- connection_id: z.ZodOptional<z.ZodString>;
1195
- client_id: z.ZodOptional<z.ZodString>;
1196
- client_name: z.ZodOptional<z.ZodString>;
1197
- audience: z.ZodOptional<z.ZodString>;
1198
- scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1199
- strategy: z.ZodOptional<z.ZodString>;
1200
- strategy_type: z.ZodOptional<z.ZodString>;
1201
- hostname: z.ZodOptional<z.ZodString>;
1202
- auth0_client: z.ZodOptional<z.ZodObject<{
1203
- name: z.ZodString;
1204
- version: z.ZodString;
1205
- env: z.ZodOptional<z.ZodObject<{
1206
- node: z.ZodOptional<z.ZodString>;
1207
- }, "strip", z.ZodTypeAny, {
1208
- node?: string | undefined;
1209
- }, {
1210
- node?: string | undefined;
1211
- }>>;
1212
- }, "strip", z.ZodTypeAny, {
1213
- name: string;
1214
- version: string;
1215
- env?: {
1216
- node?: string | undefined;
1217
- } | undefined;
1218
- }, {
1219
- name: string;
1220
- version: string;
1221
- env?: {
1222
- node?: string | undefined;
1223
- } | undefined;
1224
- }>>;
1225
- }, "strip", z.ZodTypeAny, {
1226
- type: "sapi" | "ssa" | "fsa" | "ss" | "fs" | "s" | "f" | "fp" | "slo" | "scoa" | "fcoa" | "seacft" | "serft" | "cls" | "seccft";
1227
- date: string;
1228
- ip: string;
1229
- user_agent: string;
1230
- isMobile: boolean;
1231
- description?: string | undefined;
1232
- connection?: string | undefined;
1233
- user_id?: string | undefined;
1234
- client_id?: string | undefined;
1235
- audience?: string | undefined;
1236
- scope?: string[] | undefined;
1237
- log_id?: string | undefined;
1238
- _id?: string | undefined;
1239
- details?: any;
1240
- user_name?: string | undefined;
1241
- connection_id?: string | undefined;
1242
- client_name?: string | undefined;
1243
- strategy?: string | undefined;
1244
- strategy_type?: string | undefined;
1245
- hostname?: string | undefined;
1246
- auth0_client?: {
1247
- name: string;
1248
- version: string;
1249
- env?: {
1250
- node?: string | undefined;
1251
- } | undefined;
1252
- } | undefined;
1253
- }, {
1254
- type: "sapi" | "ssa" | "fsa" | "ss" | "fs" | "s" | "f" | "fp" | "slo" | "scoa" | "fcoa" | "seacft" | "serft" | "cls" | "seccft";
1255
- date: string;
1256
- ip: string;
1257
- user_agent: string;
1258
- isMobile: boolean;
1259
- description?: string | undefined;
1260
- connection?: string | undefined;
1261
- user_id?: string | undefined;
1262
- client_id?: string | undefined;
1263
- audience?: string | undefined;
1264
- scope?: string[] | undefined;
1265
- log_id?: string | undefined;
1266
- _id?: string | undefined;
1267
- details?: any;
1268
- user_name?: string | undefined;
1269
- connection_id?: string | undefined;
1270
- client_name?: string | undefined;
1271
- strategy?: string | undefined;
1272
- strategy_type?: string | undefined;
1273
- hostname?: string | undefined;
1274
- auth0_client?: {
1275
- name: string;
1276
- version: string;
1277
- env?: {
1278
- node?: string | undefined;
1279
- } | undefined;
1280
- } | undefined;
1281
- }>;
1282
- export type Log = z.infer<typeof logSchema>;
1283
- export type LogsResponse = Log & {
1284
- log_id: string;
1285
- _id: string;
1286
- };
1287
1287
  export interface CodesAdapter {
1288
1288
  create: (tenant_id: string, authCode: Code) => Promise<void>;
1289
1289
  list: (tenant_id: string, user_id: string) => Promise<Code[]>;
@@ -1471,13 +1471,6 @@ export interface SqlOTP {
1471
1471
  used_at?: string;
1472
1472
  user_id?: string;
1473
1473
  }
1474
- export interface SqlPassword {
1475
- tenant_id: string;
1476
- user_id: string;
1477
- password: string;
1478
- created_at: string;
1479
- updated_at: string;
1480
- }
1481
1474
  export interface SqlTicket {
1482
1475
  id: string;
1483
1476
  tenant_id: string;
@@ -1537,24 +1530,28 @@ export interface SqlLog {
1537
1530
  hostname?: string;
1538
1531
  session_connection?: string;
1539
1532
  }
1540
- export interface SqlSession {
1541
- tenant_id: string;
1542
- created_at: string;
1543
- user_id: string;
1544
- client_id: string;
1545
- expires_at: string;
1546
- used_at: string;
1547
- id: string;
1548
- deleted_at?: string | undefined;
1549
- }
1533
+ declare const sqlThemeSchema: z.ZodObject<z.objectUtil.extendShape<any, {
1534
+ tenant_id: z.ZodString;
1535
+ }>, "strip", z.ZodTypeAny, {
1536
+ [x: string]: any;
1537
+ tenant_id?: unknown;
1538
+ }, {
1539
+ [x: string]: any;
1540
+ tenant_id?: unknown;
1541
+ }>;
1542
+ export type SqlTheme = z.infer<typeof sqlThemeSchema>;
1550
1543
  export interface Database {
1551
- authentication_codes: SqlAuthenticationCode;
1552
- branding: SqlBranding & {
1544
+ applications: Application & {
1553
1545
  tenant_id: string;
1554
1546
  };
1547
+ authentication_codes: SqlAuthenticationCode;
1548
+ branding: SqlBranding;
1555
1549
  codes: Code & {
1556
1550
  tenant_id: string;
1557
1551
  };
1552
+ connections: Connection & {
1553
+ tenant_id: string;
1554
+ };
1558
1555
  domains: Domain & {
1559
1556
  tenant_id: string;
1560
1557
  };
@@ -1562,20 +1559,19 @@ export interface Database {
1562
1559
  tenant_id: string;
1563
1560
  };
1564
1561
  keys: Certificate;
1565
- users: SqlUser;
1566
- applications: Application & {
1562
+ logs: SqlLog;
1563
+ otps: SqlOTP;
1564
+ passwords: Password & {
1567
1565
  tenant_id: string;
1568
1566
  };
1569
- connections: Connection & {
1567
+ users: SqlUser;
1568
+ sessions: Session & {
1570
1569
  tenant_id: string;
1571
1570
  };
1572
- otps: SqlOTP;
1573
- passwords: SqlPassword;
1574
- sessions: SqlSession;
1575
1571
  tenants: Tenant;
1572
+ themes: SqlTheme;
1576
1573
  tickets: SqlTicket;
1577
1574
  universal_login_sessions: SqlUniversalLoginSession;
1578
- logs: SqlLog;
1579
1575
  }
1580
1576
  declare function createAdapters(db: Kysely<Database>): {
1581
1577
  applications: ApplicationsAdapter;
@@ -1630,19 +1626,19 @@ declare function createAdapters(db: Kysely<Database>): {
1630
1626
  }[];
1631
1627
  } | null>;
1632
1628
  };
1629
+ codes: CodesAdapter;
1630
+ connections: ConnectionsAdapter;
1631
+ domains: DomainsAdapter;
1632
+ hooks: HooksAdapter;
1633
1633
  keys: KeysAdapter;
1634
+ logs: LogsDataAdapter;
1635
+ OTP: OTPAdapter;
1636
+ passwords: PasswordsAdapter;
1634
1637
  users: UserDataAdapter;
1635
1638
  sessions: SessionsAdapter;
1636
1639
  tenants: TenantsDataAdapter;
1637
1640
  tickets: TicketsAdapter;
1638
1641
  universalLoginSessions: UniversalLoginSessionsAdapter;
1639
- OTP: OTPAdapter;
1640
- logs: LogsDataAdapter;
1641
- passwords: PasswordsAdapter;
1642
- codes: CodesAdapter;
1643
- connections: ConnectionsAdapter;
1644
- domains: DomainsAdapter;
1645
- hooks: HooksAdapter;
1646
1642
  };
1647
1643
 
1648
1644
  export {