@authhero/kysely-adapter 8.3.0 → 9.0.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.
@@ -702,25 +702,6 @@ declare const brandingSchema: z.ZodObject<{
702
702
  }>;
703
703
  export type Branding = z.infer<typeof brandingSchema>;
704
704
  declare const ClientSchema: z.ZodObject<{
705
- domains: z.ZodArray<z.ZodObject<{
706
- domain: z.ZodString;
707
- dkim_private_key: z.ZodOptional<z.ZodString>;
708
- dkim_public_key: z.ZodOptional<z.ZodString>;
709
- email_api_key: z.ZodOptional<z.ZodString>;
710
- email_service: z.ZodOptional<z.ZodString>;
711
- }, "strip", z.ZodTypeAny, {
712
- domain: string;
713
- dkim_private_key?: string | undefined;
714
- dkim_public_key?: string | undefined;
715
- email_api_key?: string | undefined;
716
- email_service?: string | undefined;
717
- }, {
718
- domain: string;
719
- dkim_private_key?: string | undefined;
720
- dkim_public_key?: string | undefined;
721
- email_api_key?: string | undefined;
722
- email_service?: string | undefined;
723
- }>, "many">;
724
705
  tenant: z.ZodObject<{
725
706
  id: z.ZodString;
726
707
  name: z.ZodString;
@@ -978,13 +959,6 @@ declare const ClientSchema: z.ZodObject<{
978
959
  name: string;
979
960
  id: string;
980
961
  disable_sign_ups: boolean;
981
- domains: {
982
- domain: string;
983
- dkim_private_key?: string | undefined;
984
- dkim_public_key?: string | undefined;
985
- email_api_key?: string | undefined;
986
- email_service?: string | undefined;
987
- }[];
988
962
  tenant: {
989
963
  created_at: string;
990
964
  updated_at: string;
@@ -1056,13 +1030,6 @@ declare const ClientSchema: z.ZodObject<{
1056
1030
  updated_at: string;
1057
1031
  name: string;
1058
1032
  id: string;
1059
- domains: {
1060
- domain: string;
1061
- dkim_private_key?: string | undefined;
1062
- dkim_public_key?: string | undefined;
1063
- email_api_key?: string | undefined;
1064
- email_service?: string | undefined;
1065
- }[];
1066
1033
  tenant: {
1067
1034
  created_at: string;
1068
1035
  updated_at: string;
@@ -1416,36 +1383,96 @@ declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1416
1383
  enabled_clients?: string[] | undefined;
1417
1384
  }>;
1418
1385
  export type Connection = z.infer<typeof connectionSchema>;
1419
- declare const domainSchema: z.ZodObject<z.objectUtil.extendShape<{
1420
- created_at: z.ZodString;
1421
- updated_at: z.ZodString;
1386
+ declare const customDomainInsertSchema: z.ZodObject<{
1387
+ domain: z.ZodString;
1388
+ type: z.ZodEnum<[
1389
+ "auth0_managed_certs",
1390
+ "self_managed_certs"
1391
+ ]>;
1392
+ verification_method: z.ZodOptional<z.ZodEnum<[
1393
+ "txt"
1394
+ ]>>;
1395
+ tls_policy: z.ZodOptional<z.ZodEnum<[
1396
+ "recommended"
1397
+ ]>>;
1398
+ custom_client_ip_header: z.ZodOptional<z.ZodEnum<[
1399
+ "true-client-ip",
1400
+ "cf-connecting-ip",
1401
+ "x-forwarded-for",
1402
+ "x-azure-clientip",
1403
+ "null"
1404
+ ]>>;
1405
+ domain_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1406
+ }, "strip", z.ZodTypeAny, {
1407
+ type: "auth0_managed_certs" | "self_managed_certs";
1408
+ domain: string;
1409
+ verification_method?: "txt" | undefined;
1410
+ tls_policy?: "recommended" | undefined;
1411
+ custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
1412
+ domain_metadata?: Record<string, string> | undefined;
1422
1413
  }, {
1423
- id: z.ZodString;
1414
+ type: "auth0_managed_certs" | "self_managed_certs";
1415
+ domain: string;
1416
+ verification_method?: "txt" | undefined;
1417
+ tls_policy?: "recommended" | undefined;
1418
+ custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
1419
+ domain_metadata?: Record<string, string> | undefined;
1420
+ }>;
1421
+ export type CustomDomainInsert = z.infer<typeof customDomainInsertSchema>;
1422
+ declare const customDomainSchema: z.ZodObject<{
1423
+ custom_domain_id: z.ZodString;
1424
+ primary: z.ZodBoolean;
1425
+ status: z.ZodEnum<[
1426
+ "disabled",
1427
+ "pending",
1428
+ "pending_verification",
1429
+ "ready"
1430
+ ]>;
1431
+ origin_domain_name: z.ZodOptional<z.ZodString>;
1432
+ verification: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
1433
+ tls_policy: z.ZodOptional<z.ZodString>;
1424
1434
  domain: z.ZodString;
1425
- dkim_private_key: z.ZodOptional<z.ZodString>;
1426
- dkim_public_key: z.ZodOptional<z.ZodString>;
1427
- email_api_key: z.ZodOptional<z.ZodString>;
1428
- email_service: z.ZodOptional<z.ZodString>;
1429
- }>, "strip", z.ZodTypeAny, {
1430
- created_at: string;
1431
- updated_at: string;
1432
- id: string;
1435
+ type: z.ZodEnum<[
1436
+ "auth0_managed_certs",
1437
+ "self_managed_certs"
1438
+ ]>;
1439
+ verification_method: z.ZodOptional<z.ZodEnum<[
1440
+ "txt"
1441
+ ]>>;
1442
+ custom_client_ip_header: z.ZodOptional<z.ZodEnum<[
1443
+ "true-client-ip",
1444
+ "cf-connecting-ip",
1445
+ "x-forwarded-for",
1446
+ "x-azure-clientip",
1447
+ "null"
1448
+ ]>>;
1449
+ domain_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1450
+ }, "strip", z.ZodTypeAny, {
1451
+ type: "auth0_managed_certs" | "self_managed_certs";
1452
+ status: "disabled" | "pending" | "pending_verification" | "ready";
1453
+ primary: boolean;
1433
1454
  domain: string;
1434
- dkim_private_key?: string | undefined;
1435
- dkim_public_key?: string | undefined;
1436
- email_api_key?: string | undefined;
1437
- email_service?: string | undefined;
1455
+ custom_domain_id: string;
1456
+ verification_method?: "txt" | undefined;
1457
+ tls_policy?: string | undefined;
1458
+ custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
1459
+ domain_metadata?: Record<string, string> | undefined;
1460
+ origin_domain_name?: string | undefined;
1461
+ verification?: {} | undefined;
1438
1462
  }, {
1439
- created_at: string;
1440
- updated_at: string;
1441
- id: string;
1463
+ type: "auth0_managed_certs" | "self_managed_certs";
1464
+ status: "disabled" | "pending" | "pending_verification" | "ready";
1465
+ primary: boolean;
1442
1466
  domain: string;
1443
- dkim_private_key?: string | undefined;
1444
- dkim_public_key?: string | undefined;
1445
- email_api_key?: string | undefined;
1446
- email_service?: string | undefined;
1467
+ custom_domain_id: string;
1468
+ verification_method?: "txt" | undefined;
1469
+ tls_policy?: string | undefined;
1470
+ custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
1471
+ domain_metadata?: Record<string, string> | undefined;
1472
+ origin_domain_name?: string | undefined;
1473
+ verification?: {} | undefined;
1447
1474
  }>;
1448
- export type Domain = z.infer<typeof domainSchema>;
1475
+ export type CustomDomain = z.infer<typeof customDomainSchema>;
1449
1476
  declare const hookInsertSchema: z.ZodObject<{
1450
1477
  trigger_id: z.ZodEnum<[
1451
1478
  "pre-user-signup",
@@ -3377,12 +3404,12 @@ export interface ConnectionsAdapter {
3377
3404
  update(tenant_id: string, connection_id: string, params: Partial<ConnectionInsert>): Promise<boolean>;
3378
3405
  list(tenant_id: string, params?: ListParams): Promise<ListConnectionsResponse>;
3379
3406
  }
3380
- export interface ListDomainsResponse extends Totals {
3381
- domains: Domain[];
3382
- }
3383
- export interface DomainsAdapter {
3384
- create(tenant_id: string, params: Domain): Promise<Domain>;
3385
- list(tenant_id: string, params?: ListParams): Promise<ListDomainsResponse>;
3407
+ export interface CustomDomainsAdapter {
3408
+ create: (tenant_id: string, custom_domain: CustomDomainInsert) => Promise<CustomDomain>;
3409
+ get: (tenant_id: string, id: string) => Promise<CustomDomain | null>;
3410
+ list: (tenant_id: string) => Promise<CustomDomain[]>;
3411
+ remove: (tenant_id: string, id: string) => Promise<boolean>;
3412
+ update: (tenant_id: string, id: string, custom_domain: Partial<CustomDomain>) => Promise<boolean>;
3386
3413
  }
3387
3414
  export interface KeysAdapter {
3388
3415
  create: (key: SigningKey) => Promise<void>;
@@ -3443,7 +3470,7 @@ export interface DataAdapters {
3443
3470
  clients: ClientsAdapter;
3444
3471
  codes: CodesAdapter;
3445
3472
  connections: ConnectionsAdapter;
3446
- domains: DomainsAdapter;
3473
+ customDomains: CustomDomainsAdapter;
3447
3474
  emailProviders: EmailProvidersAdapter;
3448
3475
  hooks: HooksAdapter;
3449
3476
  keys: KeysAdapter;
@@ -3922,6 +3949,68 @@ declare const sqlRefreshTokensSchema: z.ZodObject<{
3922
3949
  idle_expires_at?: string | undefined;
3923
3950
  last_exchanged_at?: string | undefined;
3924
3951
  }>;
3952
+ declare const sqlCustomDomainSchema: z.ZodObject<{
3953
+ primary: z.ZodNumber;
3954
+ tenant_id: z.ZodString;
3955
+ created_at: z.ZodString;
3956
+ updated_at: z.ZodString;
3957
+ custom_domain_id: z.ZodString;
3958
+ status: z.ZodEnum<[
3959
+ "disabled",
3960
+ "pending",
3961
+ "pending_verification",
3962
+ "ready"
3963
+ ]>;
3964
+ origin_domain_name: z.ZodOptional<z.ZodString>;
3965
+ verification: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
3966
+ tls_policy: z.ZodOptional<z.ZodString>;
3967
+ domain: z.ZodString;
3968
+ type: z.ZodEnum<[
3969
+ "auth0_managed_certs",
3970
+ "self_managed_certs"
3971
+ ]>;
3972
+ verification_method: z.ZodOptional<z.ZodEnum<[
3973
+ "txt"
3974
+ ]>>;
3975
+ custom_client_ip_header: z.ZodOptional<z.ZodEnum<[
3976
+ "true-client-ip",
3977
+ "cf-connecting-ip",
3978
+ "x-forwarded-for",
3979
+ "x-azure-clientip",
3980
+ "null"
3981
+ ]>>;
3982
+ domain_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3983
+ }, "strip", z.ZodTypeAny, {
3984
+ tenant_id: string;
3985
+ type: "auth0_managed_certs" | "self_managed_certs";
3986
+ status: "disabled" | "pending" | "pending_verification" | "ready";
3987
+ created_at: string;
3988
+ updated_at: string;
3989
+ primary: number;
3990
+ custom_domain_id: string;
3991
+ domain: string;
3992
+ origin_domain_name?: string | undefined;
3993
+ verification?: {} | undefined;
3994
+ tls_policy?: string | undefined;
3995
+ verification_method?: "txt" | undefined;
3996
+ custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
3997
+ domain_metadata?: Record<string, string> | undefined;
3998
+ }, {
3999
+ tenant_id: string;
4000
+ type: "auth0_managed_certs" | "self_managed_certs";
4001
+ status: "disabled" | "pending" | "pending_verification" | "ready";
4002
+ created_at: string;
4003
+ updated_at: string;
4004
+ primary: number;
4005
+ custom_domain_id: string;
4006
+ domain: string;
4007
+ origin_domain_name?: string | undefined;
4008
+ verification?: {} | undefined;
4009
+ tls_policy?: string | undefined;
4010
+ verification_method?: "txt" | undefined;
4011
+ custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
4012
+ domain_metadata?: Record<string, string> | undefined;
4013
+ }>;
3925
4014
  export interface Database {
3926
4015
  applications: z.infer<typeof sqlApplicationSchema>;
3927
4016
  branding: z.infer<typeof sqlBrandingSchema>;
@@ -3929,9 +4018,7 @@ export interface Database {
3929
4018
  tenant_id: string;
3930
4019
  };
3931
4020
  connections: z.infer<typeof sqlConnectionSchema>;
3932
- domains: Domain & {
3933
- tenant_id: string;
3934
- };
4021
+ custom_domains: z.infer<typeof sqlCustomDomainSchema>;
3935
4022
  email_providers: z.infer<typeof sqlEmailProvidersSchema>;
3936
4023
  hooks: z.infer<typeof sqlHookSchema>;
3937
4024
  keys: SigningKey & {