@authhero/kysely-adapter 0.7.3 → 0.7.5

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.
@@ -245,16 +245,14 @@ export type User = z.infer<typeof userSchema>;
245
245
  declare const applicationInsertSchema: z.ZodObject<{
246
246
  id: z.ZodString;
247
247
  name: z.ZodString;
248
- callbacks: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
249
- allowed_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
250
- web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
251
- allowed_logout_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
248
+ callbacks: z.ZodArray<z.ZodString, "many">;
249
+ allowed_origins: z.ZodArray<z.ZodString, "many">;
250
+ web_origins: z.ZodArray<z.ZodString, "many">;
251
+ allowed_logout_urls: z.ZodArray<z.ZodString, "many">;
252
252
  addons: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[
253
253
  z.ZodString,
254
254
  z.ZodNumber
255
255
  ]>>>>;
256
- allowed_web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
257
- allowed_callback_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
258
256
  email_validation: z.ZodDefault<z.ZodEnum<[
259
257
  "enabled",
260
258
  "disabled",
@@ -265,12 +263,10 @@ declare const applicationInsertSchema: z.ZodObject<{
265
263
  }, "strip", z.ZodTypeAny, {
266
264
  name: string;
267
265
  id: string;
268
- callbacks: string;
269
- allowed_origins: string;
270
- web_origins: string;
271
- allowed_logout_urls: string;
272
- allowed_web_origins: string;
273
- allowed_callback_urls: string;
266
+ callbacks: string[];
267
+ allowed_origins: string[];
268
+ web_origins: string[];
269
+ allowed_logout_urls: string[];
274
270
  email_validation: "enabled" | "disabled" | "enforced";
275
271
  client_secret: string;
276
272
  disable_sign_ups: boolean;
@@ -278,34 +274,27 @@ declare const applicationInsertSchema: z.ZodObject<{
278
274
  }, {
279
275
  name: string;
280
276
  id: string;
281
- callbacks?: string | undefined;
282
- allowed_origins?: string | undefined;
283
- web_origins?: string | undefined;
284
- allowed_logout_urls?: string | undefined;
277
+ callbacks: string[];
278
+ allowed_origins: string[];
279
+ web_origins: string[];
280
+ allowed_logout_urls: string[];
285
281
  addons?: Record<string, Record<string, string | number>> | undefined;
286
- allowed_web_origins?: string | undefined;
287
- allowed_callback_urls?: string | undefined;
288
282
  email_validation?: "enabled" | "disabled" | "enforced" | undefined;
289
283
  client_secret?: string | undefined;
290
284
  disable_sign_ups?: boolean | undefined;
291
285
  }>;
292
286
  export type ApplicationInsert = z.infer<typeof applicationInsertSchema>;
293
- declare const applicationSchema: z.ZodObject<z.objectUtil.extendShape<{
294
- created_at: z.ZodEffects<z.ZodString, string, string>;
295
- updated_at: z.ZodEffects<z.ZodString, string, string>;
296
- }, {
287
+ declare const applicationSchema: z.ZodObject<{
297
288
  id: z.ZodString;
298
289
  name: z.ZodString;
299
- callbacks: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
300
- allowed_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
301
- web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
302
- allowed_logout_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
290
+ callbacks: z.ZodArray<z.ZodString, "many">;
291
+ allowed_origins: z.ZodArray<z.ZodString, "many">;
292
+ web_origins: z.ZodArray<z.ZodString, "many">;
293
+ allowed_logout_urls: z.ZodArray<z.ZodString, "many">;
303
294
  addons: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[
304
295
  z.ZodString,
305
296
  z.ZodNumber
306
297
  ]>>>>;
307
- allowed_web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
308
- allowed_callback_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
309
298
  email_validation: z.ZodDefault<z.ZodEnum<[
310
299
  "enabled",
311
300
  "disabled",
@@ -313,17 +302,17 @@ declare const applicationSchema: z.ZodObject<z.objectUtil.extendShape<{
313
302
  ]>>;
314
303
  client_secret: z.ZodDefault<z.ZodString>;
315
304
  disable_sign_ups: z.ZodDefault<z.ZodBoolean>;
316
- }>, "strip", z.ZodTypeAny, {
305
+ created_at: z.ZodEffects<z.ZodString, string, string>;
306
+ updated_at: z.ZodEffects<z.ZodString, string, string>;
307
+ }, "strip", z.ZodTypeAny, {
317
308
  created_at: string;
318
309
  updated_at: string;
319
310
  name: string;
320
311
  id: string;
321
- callbacks: string;
322
- allowed_origins: string;
323
- web_origins: string;
324
- allowed_logout_urls: string;
325
- allowed_web_origins: string;
326
- allowed_callback_urls: string;
312
+ callbacks: string[];
313
+ allowed_origins: string[];
314
+ web_origins: string[];
315
+ allowed_logout_urls: string[];
327
316
  email_validation: "enabled" | "disabled" | "enforced";
328
317
  client_secret: string;
329
318
  disable_sign_ups: boolean;
@@ -333,13 +322,11 @@ declare const applicationSchema: z.ZodObject<z.objectUtil.extendShape<{
333
322
  updated_at: string;
334
323
  name: string;
335
324
  id: string;
336
- callbacks?: string | undefined;
337
- allowed_origins?: string | undefined;
338
- web_origins?: string | undefined;
339
- allowed_logout_urls?: string | undefined;
325
+ callbacks: string[];
326
+ allowed_origins: string[];
327
+ web_origins: string[];
328
+ allowed_logout_urls: string[];
340
329
  addons?: Record<string, Record<string, string | number>> | undefined;
341
- allowed_web_origins?: string | undefined;
342
- allowed_callback_urls?: string | undefined;
343
330
  email_validation?: "enabled" | "disabled" | "enforced" | undefined;
344
331
  client_secret?: string | undefined;
345
332
  disable_sign_ups?: boolean | undefined;
@@ -438,9 +425,7 @@ declare const brandingSchema: z.ZodObject<{
438
425
  } | undefined;
439
426
  }>;
440
427
  export type Branding = z.infer<typeof brandingSchema>;
441
- declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
442
- id: z.ZodString;
443
- name: z.ZodString;
428
+ declare const ClientSchema: z.ZodObject<{
444
429
  domains: z.ZodArray<z.ZodObject<{
445
430
  domain: z.ZodString;
446
431
  dkim_private_key: z.ZodOptional<z.ZodString>;
@@ -463,70 +448,69 @@ declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
463
448
  email_api_key?: string | undefined;
464
449
  email_service?: "mailgun" | "mailchannels" | undefined;
465
450
  }>, "many">;
466
- allowed_callback_urls: z.ZodArray<z.ZodString, "many">;
467
- allowed_logout_urls: z.ZodArray<z.ZodString, "many">;
468
- allowed_web_origins: z.ZodArray<z.ZodString, "many">;
469
- email_validation: z.ZodUnion<[
470
- z.ZodLiteral<"enabled">,
471
- z.ZodLiteral<"disabled">,
472
- z.ZodLiteral<"enforced">
473
- ]>;
474
- tenant_id: z.ZodString;
475
- client_secret: z.ZodString;
476
- disable_sign_ups: z.ZodBoolean;
477
451
  tenant: z.ZodObject<{
478
452
  name: z.ZodString;
479
- audience: z.ZodOptional<z.ZodString>;
480
- logo: z.ZodOptional<z.ZodString>;
481
- primary_color: z.ZodOptional<z.ZodString>;
482
- secondary_color: z.ZodOptional<z.ZodString>;
453
+ audience: z.ZodString;
483
454
  sender_email: z.ZodString;
484
455
  sender_name: z.ZodString;
485
456
  support_url: z.ZodOptional<z.ZodString>;
457
+ logo: z.ZodOptional<z.ZodString>;
458
+ primary_color: z.ZodOptional<z.ZodString>;
459
+ secondary_color: z.ZodOptional<z.ZodString>;
486
460
  language: z.ZodOptional<z.ZodString>;
461
+ created_at: z.ZodEffects<z.ZodString, string, string>;
462
+ updated_at: z.ZodEffects<z.ZodString, string, string>;
463
+ id: z.ZodString;
487
464
  }, "strip", z.ZodTypeAny, {
465
+ created_at: string;
466
+ updated_at: string;
488
467
  name: string;
468
+ id: string;
469
+ audience: string;
489
470
  sender_email: string;
490
471
  sender_name: string;
491
- audience?: string | undefined;
472
+ support_url?: string | undefined;
492
473
  logo?: string | undefined;
493
474
  primary_color?: string | undefined;
494
475
  secondary_color?: string | undefined;
495
- support_url?: string | undefined;
496
476
  language?: string | undefined;
497
477
  }, {
478
+ created_at: string;
479
+ updated_at: string;
498
480
  name: string;
481
+ id: string;
482
+ audience: string;
499
483
  sender_email: string;
500
484
  sender_name: string;
501
- audience?: string | undefined;
485
+ support_url?: string | undefined;
502
486
  logo?: string | undefined;
503
487
  primary_color?: string | undefined;
504
488
  secondary_color?: string | undefined;
505
- support_url?: string | undefined;
506
489
  language?: string | undefined;
507
490
  }>;
508
- }, {
509
- connections: z.ZodArray<z.ZodObject<{
510
- created_at: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
511
- updated_at: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
512
- id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
513
- name: z.ZodOptional<z.ZodString>;
514
- client_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
515
- client_secret: z.ZodOptional<z.ZodOptional<z.ZodString>>;
516
- authorization_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
517
- response_type: z.ZodOptional<z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>>;
518
- response_mode: z.ZodOptional<z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>>;
519
- private_key: z.ZodOptional<z.ZodOptional<z.ZodString>>;
520
- kid: z.ZodOptional<z.ZodOptional<z.ZodString>>;
521
- team_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
522
- token_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
523
- token_exchange_basic_auth: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
524
- userinfo_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
525
- scope: z.ZodOptional<z.ZodOptional<z.ZodString>>;
526
- }, "strip", z.ZodTypeAny, {
527
- created_at?: string | undefined;
528
- updated_at?: string | undefined;
529
- name?: string | undefined;
491
+ connections: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
492
+ id: z.ZodString;
493
+ created_at: z.ZodEffects<z.ZodString, string, string>;
494
+ updated_at: z.ZodEffects<z.ZodString, string, string>;
495
+ }, {
496
+ id: z.ZodOptional<z.ZodString>;
497
+ name: z.ZodString;
498
+ client_id: z.ZodOptional<z.ZodString>;
499
+ client_secret: z.ZodOptional<z.ZodString>;
500
+ authorization_endpoint: z.ZodOptional<z.ZodString>;
501
+ response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
502
+ response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
503
+ private_key: z.ZodOptional<z.ZodString>;
504
+ kid: z.ZodOptional<z.ZodString>;
505
+ team_id: z.ZodOptional<z.ZodString>;
506
+ token_endpoint: z.ZodOptional<z.ZodString>;
507
+ token_exchange_basic_auth: z.ZodOptional<z.ZodBoolean>;
508
+ userinfo_endpoint: z.ZodOptional<z.ZodString>;
509
+ scope: z.ZodOptional<z.ZodString>;
510
+ }>, "strip", z.ZodTypeAny, {
511
+ created_at: string;
512
+ updated_at: string;
513
+ name: string;
530
514
  id?: string | undefined;
531
515
  client_secret?: string | undefined;
532
516
  client_id?: string | undefined;
@@ -541,9 +525,9 @@ declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
541
525
  token_exchange_basic_auth?: boolean | undefined;
542
526
  userinfo_endpoint?: string | undefined;
543
527
  }, {
544
- created_at?: string | undefined;
545
- updated_at?: string | undefined;
546
- name?: string | undefined;
528
+ created_at: string;
529
+ updated_at: string;
530
+ name: string;
547
531
  id?: string | undefined;
548
532
  client_secret?: string | undefined;
549
533
  client_id?: string | undefined;
@@ -558,12 +542,34 @@ declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
558
542
  token_exchange_basic_auth?: boolean | undefined;
559
543
  userinfo_endpoint?: string | undefined;
560
544
  }>, "many">;
561
- }>, "strip", z.ZodTypeAny, {
545
+ id: z.ZodString;
546
+ name: z.ZodString;
547
+ callbacks: z.ZodArray<z.ZodString, "many">;
548
+ allowed_origins: z.ZodArray<z.ZodString, "many">;
549
+ web_origins: z.ZodArray<z.ZodString, "many">;
550
+ allowed_logout_urls: z.ZodArray<z.ZodString, "many">;
551
+ addons: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[
552
+ z.ZodString,
553
+ z.ZodNumber
554
+ ]>>>>;
555
+ email_validation: z.ZodDefault<z.ZodEnum<[
556
+ "enabled",
557
+ "disabled",
558
+ "enforced"
559
+ ]>>;
560
+ client_secret: z.ZodDefault<z.ZodString>;
561
+ disable_sign_ups: z.ZodDefault<z.ZodBoolean>;
562
+ created_at: z.ZodEffects<z.ZodString, string, string>;
563
+ updated_at: z.ZodEffects<z.ZodString, string, string>;
564
+ }, "strip", z.ZodTypeAny, {
565
+ created_at: string;
566
+ updated_at: string;
562
567
  name: string;
563
568
  id: string;
569
+ callbacks: string[];
570
+ allowed_origins: string[];
571
+ web_origins: string[];
564
572
  allowed_logout_urls: string[];
565
- allowed_web_origins: string[];
566
- allowed_callback_urls: string[];
567
573
  email_validation: "enabled" | "disabled" | "enforced";
568
574
  client_secret: string;
569
575
  disable_sign_ups: boolean;
@@ -574,22 +580,24 @@ declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
574
580
  email_api_key?: string | undefined;
575
581
  email_service?: "mailgun" | "mailchannels" | undefined;
576
582
  }[];
577
- tenant_id: string;
578
583
  tenant: {
584
+ created_at: string;
585
+ updated_at: string;
579
586
  name: string;
587
+ id: string;
588
+ audience: string;
580
589
  sender_email: string;
581
590
  sender_name: string;
582
- audience?: string | undefined;
591
+ support_url?: string | undefined;
583
592
  logo?: string | undefined;
584
593
  primary_color?: string | undefined;
585
594
  secondary_color?: string | undefined;
586
- support_url?: string | undefined;
587
595
  language?: string | undefined;
588
596
  };
589
597
  connections: {
590
- created_at?: string | undefined;
591
- updated_at?: string | undefined;
592
- name?: string | undefined;
598
+ created_at: string;
599
+ updated_at: string;
600
+ name: string;
593
601
  id?: string | undefined;
594
602
  client_secret?: string | undefined;
595
603
  client_id?: string | undefined;
@@ -604,15 +612,16 @@ declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
604
612
  token_exchange_basic_auth?: boolean | undefined;
605
613
  userinfo_endpoint?: string | undefined;
606
614
  }[];
615
+ addons?: Record<string, Record<string, string | number>> | undefined;
607
616
  }, {
617
+ created_at: string;
618
+ updated_at: string;
608
619
  name: string;
609
620
  id: string;
621
+ callbacks: string[];
622
+ allowed_origins: string[];
623
+ web_origins: string[];
610
624
  allowed_logout_urls: string[];
611
- allowed_web_origins: string[];
612
- allowed_callback_urls: string[];
613
- email_validation: "enabled" | "disabled" | "enforced";
614
- client_secret: string;
615
- disable_sign_ups: boolean;
616
625
  domains: {
617
626
  domain: string;
618
627
  dkim_private_key?: string | undefined;
@@ -620,22 +629,24 @@ declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
620
629
  email_api_key?: string | undefined;
621
630
  email_service?: "mailgun" | "mailchannels" | undefined;
622
631
  }[];
623
- tenant_id: string;
624
632
  tenant: {
633
+ created_at: string;
634
+ updated_at: string;
625
635
  name: string;
636
+ id: string;
637
+ audience: string;
626
638
  sender_email: string;
627
639
  sender_name: string;
628
- audience?: string | undefined;
640
+ support_url?: string | undefined;
629
641
  logo?: string | undefined;
630
642
  primary_color?: string | undefined;
631
643
  secondary_color?: string | undefined;
632
- support_url?: string | undefined;
633
644
  language?: string | undefined;
634
645
  };
635
646
  connections: {
636
- created_at?: string | undefined;
637
- updated_at?: string | undefined;
638
- name?: string | undefined;
647
+ created_at: string;
648
+ updated_at: string;
649
+ name: string;
639
650
  id?: string | undefined;
640
651
  client_secret?: string | undefined;
641
652
  client_id?: string | undefined;
@@ -650,8 +661,12 @@ declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
650
661
  token_exchange_basic_auth?: boolean | undefined;
651
662
  userinfo_endpoint?: string | undefined;
652
663
  }[];
664
+ addons?: Record<string, Record<string, string | number>> | undefined;
665
+ email_validation?: "enabled" | "disabled" | "enforced" | undefined;
666
+ client_secret?: string | undefined;
667
+ disable_sign_ups?: boolean | undefined;
653
668
  }>;
654
- export type PartialClient = z.infer<typeof PartialClientSchema>;
669
+ export type Client = z.infer<typeof ClientSchema>;
655
670
  declare const codeTypeSchema: z.ZodEnum<[
656
671
  "password_reset",
657
672
  "email_verification",
@@ -2812,7 +2827,7 @@ export interface HooksAdapter {
2812
2827
  list: (tenant_id: string, params: ListParams) => Promise<ListHooksResponse>;
2813
2828
  }
2814
2829
  export interface ClientsAdapter {
2815
- get: (id: string) => Promise<PartialClient | null>;
2830
+ get: (id: string) => Promise<Client | null>;
2816
2831
  }
2817
2832
  export interface ThemesAdapter {
2818
2833
  create: (tenant_id: string, theme: ThemeInsert) => Promise<Theme>;
@@ -2976,51 +2991,45 @@ declare const sqlApplicationSchema: z.ZodObject<{
2976
2991
  addons: z.ZodString;
2977
2992
  disable_sign_ups: z.ZodNumber;
2978
2993
  callbacks: z.ZodString;
2979
- created_at: z.ZodEffects<z.ZodString, string, string>;
2980
- updated_at: z.ZodEffects<z.ZodString, string, string>;
2994
+ allowed_origins: z.ZodString;
2995
+ web_origins: z.ZodString;
2996
+ allowed_logout_urls: z.ZodString;
2981
2997
  id: z.ZodString;
2982
2998
  name: z.ZodString;
2983
- allowed_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
2984
- web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
2985
- allowed_logout_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
2986
- allowed_web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
2987
- allowed_callback_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
2988
2999
  email_validation: z.ZodDefault<z.ZodEnum<[
2989
3000
  "enabled",
2990
3001
  "disabled",
2991
3002
  "enforced"
2992
3003
  ]>>;
2993
3004
  client_secret: z.ZodDefault<z.ZodString>;
3005
+ created_at: z.ZodEffects<z.ZodString, string, string>;
3006
+ updated_at: z.ZodEffects<z.ZodString, string, string>;
2994
3007
  }, "strip", z.ZodTypeAny, {
2995
3008
  tenant_id: string;
2996
- created_at: string;
2997
- updated_at: string;
2998
- id: string;
2999
- name: string;
3009
+ addons: string;
3010
+ disable_sign_ups: number;
3000
3011
  callbacks: string;
3001
3012
  allowed_origins: string;
3002
3013
  web_origins: string;
3003
3014
  allowed_logout_urls: string;
3004
- addons: string;
3005
- allowed_web_origins: string;
3006
- allowed_callback_urls: string;
3015
+ id: string;
3016
+ name: string;
3007
3017
  email_validation: "enabled" | "disabled" | "enforced";
3008
3018
  client_secret: string;
3009
- disable_sign_ups: number;
3010
- }, {
3011
- tenant_id: string;
3012
3019
  created_at: string;
3013
3020
  updated_at: string;
3014
- id: string;
3015
- name: string;
3016
- callbacks: string;
3021
+ }, {
3022
+ tenant_id: string;
3017
3023
  addons: string;
3018
3024
  disable_sign_ups: number;
3019
- allowed_origins?: string | undefined;
3020
- web_origins?: string | undefined;
3021
- allowed_logout_urls?: string | undefined;
3022
- allowed_web_origins?: string | undefined;
3023
- allowed_callback_urls?: string | undefined;
3025
+ callbacks: string;
3026
+ allowed_origins: string;
3027
+ web_origins: string;
3028
+ allowed_logout_urls: string;
3029
+ id: string;
3030
+ name: string;
3031
+ created_at: string;
3032
+ updated_at: string;
3024
3033
  email_validation?: "enabled" | "disabled" | "enforced" | undefined;
3025
3034
  client_secret?: string | undefined;
3026
3035
  }>;