@authhero/kysely-adapter 0.6.1 → 0.6.3
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.
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -597,6 +597,33 @@ declare const codeTypeSchema: z.ZodEnum<[
|
|
|
597
597
|
"ticket"
|
|
598
598
|
]>;
|
|
599
599
|
export type CodeType = z.infer<typeof codeTypeSchema>;
|
|
600
|
+
declare const codeInsertSchema: z.ZodObject<{
|
|
601
|
+
code_id: z.ZodString;
|
|
602
|
+
login_id: z.ZodString;
|
|
603
|
+
code_type: z.ZodEnum<[
|
|
604
|
+
"password_reset",
|
|
605
|
+
"email_verification",
|
|
606
|
+
"otp",
|
|
607
|
+
"oauth2",
|
|
608
|
+
"oauth2_state",
|
|
609
|
+
"ticket"
|
|
610
|
+
]>;
|
|
611
|
+
expires_at: z.ZodString;
|
|
612
|
+
used_at: z.ZodOptional<z.ZodString>;
|
|
613
|
+
}, "strip", z.ZodTypeAny, {
|
|
614
|
+
code_id: string;
|
|
615
|
+
login_id: string;
|
|
616
|
+
code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
|
|
617
|
+
expires_at: string;
|
|
618
|
+
used_at?: string | undefined;
|
|
619
|
+
}, {
|
|
620
|
+
code_id: string;
|
|
621
|
+
login_id: string;
|
|
622
|
+
code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
|
|
623
|
+
expires_at: string;
|
|
624
|
+
used_at?: string | undefined;
|
|
625
|
+
}>;
|
|
626
|
+
export type CodeInsert = z.infer<typeof codeInsertSchema>;
|
|
600
627
|
declare const codeSchema: z.ZodObject<{
|
|
601
628
|
created_at: z.ZodString;
|
|
602
629
|
code_id: z.ZodString;
|
|
@@ -770,16 +797,22 @@ declare const hookInsertSchema: z.ZodObject<{
|
|
|
770
797
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
771
798
|
url: z.ZodString;
|
|
772
799
|
hook_id: z.ZodOptional<z.ZodString>;
|
|
800
|
+
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
801
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
773
802
|
}, "strip", z.ZodTypeAny, {
|
|
774
803
|
enabled: boolean;
|
|
775
804
|
url: string;
|
|
776
805
|
trigger_id: "post-user-registration" | "post-user-login";
|
|
806
|
+
synchronous: boolean;
|
|
777
807
|
hook_id?: string | undefined;
|
|
808
|
+
priority?: number | undefined;
|
|
778
809
|
}, {
|
|
779
810
|
url: string;
|
|
780
811
|
trigger_id: "post-user-registration" | "post-user-login";
|
|
781
812
|
enabled?: boolean | undefined;
|
|
782
813
|
hook_id?: string | undefined;
|
|
814
|
+
synchronous?: boolean | undefined;
|
|
815
|
+
priority?: number | undefined;
|
|
783
816
|
}>;
|
|
784
817
|
export type HookInsert = z.infer<typeof hookInsertSchema>;
|
|
785
818
|
declare const hookSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
@@ -790,6 +823,8 @@ declare const hookSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
790
823
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
791
824
|
url: z.ZodString;
|
|
792
825
|
hook_id: z.ZodOptional<z.ZodString>;
|
|
826
|
+
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
827
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
793
828
|
}, {
|
|
794
829
|
hook_id: z.ZodString;
|
|
795
830
|
created_at: z.ZodString;
|
|
@@ -801,6 +836,8 @@ declare const hookSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
801
836
|
url: string;
|
|
802
837
|
trigger_id: "post-user-registration" | "post-user-login";
|
|
803
838
|
hook_id: string;
|
|
839
|
+
synchronous: boolean;
|
|
840
|
+
priority?: number | undefined;
|
|
804
841
|
}, {
|
|
805
842
|
created_at: string;
|
|
806
843
|
updated_at: string;
|
|
@@ -808,6 +845,8 @@ declare const hookSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
808
845
|
trigger_id: "post-user-registration" | "post-user-login";
|
|
809
846
|
hook_id: string;
|
|
810
847
|
enabled?: boolean | undefined;
|
|
848
|
+
synchronous?: boolean | undefined;
|
|
849
|
+
priority?: number | undefined;
|
|
811
850
|
}>;
|
|
812
851
|
export type Hook = z.infer<typeof hookSchema>;
|
|
813
852
|
declare const loginInsertSchema: z.ZodObject<{
|
|
@@ -2567,7 +2606,7 @@ export interface ListCodesResponse extends Totals {
|
|
|
2567
2606
|
codes: Code[];
|
|
2568
2607
|
}
|
|
2569
2608
|
export interface CodesAdapter {
|
|
2570
|
-
create: (tenant_id: string, authCode:
|
|
2609
|
+
create: (tenant_id: string, authCode: CodeInsert) => Promise<Code>;
|
|
2571
2610
|
get: (tenant_id: string, code_id: string, type: CodeType) => Promise<Code | null>;
|
|
2572
2611
|
list: (tenant_id: string, params: ListParams) => Promise<ListCodesResponse>;
|
|
2573
2612
|
remove: (tenant_id: string, code: string) => Promise<boolean>;
|