@authhero/kysely-adapter 10.119.0 → 10.121.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.
- package/dist/kysely-adapter.cjs +12 -12
- package/dist/kysely-adapter.d.ts +128 -0
- package/dist/kysely-adapter.mjs +1153 -1066
- package/package.json +2 -2
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -15069,6 +15069,33 @@ declare const hookInsertSchema: z.ZodUnion<[
|
|
|
15069
15069
|
synchronous?: boolean | undefined;
|
|
15070
15070
|
priority?: number | undefined;
|
|
15071
15071
|
hook_id?: string | undefined;
|
|
15072
|
+
}>,
|
|
15073
|
+
z.ZodObject<{
|
|
15074
|
+
trigger_id: z.ZodEnum<[
|
|
15075
|
+
"post-user-login",
|
|
15076
|
+
"credentials-exchange",
|
|
15077
|
+
"pre-user-registration",
|
|
15078
|
+
"post-user-registration"
|
|
15079
|
+
]>;
|
|
15080
|
+
code_id: z.ZodString;
|
|
15081
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
15082
|
+
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
15083
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
15084
|
+
hook_id: z.ZodOptional<z.ZodString>;
|
|
15085
|
+
}, "strip", z.ZodTypeAny, {
|
|
15086
|
+
code_id: string;
|
|
15087
|
+
enabled: boolean;
|
|
15088
|
+
trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "credentials-exchange";
|
|
15089
|
+
synchronous: boolean;
|
|
15090
|
+
priority?: number | undefined;
|
|
15091
|
+
hook_id?: string | undefined;
|
|
15092
|
+
}, {
|
|
15093
|
+
code_id: string;
|
|
15094
|
+
trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "credentials-exchange";
|
|
15095
|
+
enabled?: boolean | undefined;
|
|
15096
|
+
synchronous?: boolean | undefined;
|
|
15097
|
+
priority?: number | undefined;
|
|
15098
|
+
hook_id?: string | undefined;
|
|
15072
15099
|
}>
|
|
15073
15100
|
]>;
|
|
15074
15101
|
export type HookInsert = z.infer<typeof hookInsertSchema>;
|
|
@@ -15176,9 +15203,77 @@ declare const hookSchema: z.ZodUnion<[
|
|
|
15176
15203
|
enabled?: boolean | undefined;
|
|
15177
15204
|
synchronous?: boolean | undefined;
|
|
15178
15205
|
priority?: number | undefined;
|
|
15206
|
+
}>,
|
|
15207
|
+
z.ZodObject<{
|
|
15208
|
+
hook_id: z.ZodString;
|
|
15209
|
+
code_id: z.ZodString;
|
|
15210
|
+
created_at: z.ZodString;
|
|
15211
|
+
updated_at: z.ZodString;
|
|
15212
|
+
trigger_id: z.ZodEnum<[
|
|
15213
|
+
"post-user-login",
|
|
15214
|
+
"credentials-exchange",
|
|
15215
|
+
"pre-user-registration",
|
|
15216
|
+
"post-user-registration"
|
|
15217
|
+
]>;
|
|
15218
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
15219
|
+
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
15220
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
15221
|
+
}, "strip", z.ZodTypeAny, {
|
|
15222
|
+
created_at: string;
|
|
15223
|
+
updated_at: string;
|
|
15224
|
+
code_id: string;
|
|
15225
|
+
enabled: boolean;
|
|
15226
|
+
trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "credentials-exchange";
|
|
15227
|
+
synchronous: boolean;
|
|
15228
|
+
hook_id: string;
|
|
15229
|
+
priority?: number | undefined;
|
|
15230
|
+
}, {
|
|
15231
|
+
created_at: string;
|
|
15232
|
+
updated_at: string;
|
|
15233
|
+
code_id: string;
|
|
15234
|
+
trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "credentials-exchange";
|
|
15235
|
+
hook_id: string;
|
|
15236
|
+
enabled?: boolean | undefined;
|
|
15237
|
+
synchronous?: boolean | undefined;
|
|
15238
|
+
priority?: number | undefined;
|
|
15179
15239
|
}>
|
|
15180
15240
|
]>;
|
|
15181
15241
|
export type Hook = z.infer<typeof hookSchema>;
|
|
15242
|
+
declare const hookCodeInsertSchema: z.ZodObject<{
|
|
15243
|
+
code: z.ZodString;
|
|
15244
|
+
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15245
|
+
}, "strip", z.ZodTypeAny, {
|
|
15246
|
+
code: string;
|
|
15247
|
+
secrets?: Record<string, string> | undefined;
|
|
15248
|
+
}, {
|
|
15249
|
+
code: string;
|
|
15250
|
+
secrets?: Record<string, string> | undefined;
|
|
15251
|
+
}>;
|
|
15252
|
+
export type HookCodeInsert = z.infer<typeof hookCodeInsertSchema>;
|
|
15253
|
+
declare const hookCodeSchema: z.ZodObject<{
|
|
15254
|
+
code: z.ZodString;
|
|
15255
|
+
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15256
|
+
} & {
|
|
15257
|
+
created_at: z.ZodString;
|
|
15258
|
+
updated_at: z.ZodString;
|
|
15259
|
+
id: z.ZodString;
|
|
15260
|
+
tenant_id: z.ZodString;
|
|
15261
|
+
}, "strip", z.ZodTypeAny, {
|
|
15262
|
+
code: string;
|
|
15263
|
+
id: string;
|
|
15264
|
+
tenant_id: string;
|
|
15265
|
+
created_at: string;
|
|
15266
|
+
updated_at: string;
|
|
15267
|
+
secrets?: Record<string, string> | undefined;
|
|
15268
|
+
}, {
|
|
15269
|
+
code: string;
|
|
15270
|
+
id: string;
|
|
15271
|
+
tenant_id: string;
|
|
15272
|
+
created_at: string;
|
|
15273
|
+
updated_at: string;
|
|
15274
|
+
secrets?: Record<string, string> | undefined;
|
|
15275
|
+
}>;
|
|
15276
|
+
export type HookCode = z.infer<typeof hookCodeSchema>;
|
|
15182
15277
|
declare const inviteInsertSchema: z.ZodObject<{
|
|
15183
15278
|
organization_id: z.ZodString;
|
|
15184
15279
|
inviter: z.ZodObject<{
|
|
@@ -19009,6 +19104,12 @@ export interface HooksAdapter {
|
|
|
19009
19104
|
update: (tenant_id: string, hook_id: string, hook: Partial<HookInsert>) => Promise<boolean>;
|
|
19010
19105
|
list: (tenant_id: string, params?: ListParams) => Promise<ListHooksResponse>;
|
|
19011
19106
|
}
|
|
19107
|
+
export interface HookCodeAdapter {
|
|
19108
|
+
create: (tenant_id: string, hookCode: HookCodeInsert) => Promise<HookCode>;
|
|
19109
|
+
get: (tenant_id: string, id: string) => Promise<HookCode | null>;
|
|
19110
|
+
update: (tenant_id: string, id: string, hookCode: Partial<HookCodeInsert>) => Promise<boolean>;
|
|
19111
|
+
remove: (tenant_id: string, id: string) => Promise<boolean>;
|
|
19112
|
+
}
|
|
19012
19113
|
export interface ThemesAdapter {
|
|
19013
19114
|
create: (tenant_id: string, theme: ThemeInsert, themeId?: string) => Promise<Theme>;
|
|
19014
19115
|
remove: (tenant_id: string, themeId: string) => Promise<boolean>;
|
|
@@ -19270,6 +19371,7 @@ export interface DataAdapters {
|
|
|
19270
19371
|
flows: FlowsAdapter;
|
|
19271
19372
|
forms: FormsAdapter;
|
|
19272
19373
|
geo?: GeoAdapter;
|
|
19374
|
+
hookCode: HookCodeAdapter;
|
|
19273
19375
|
hooks: HooksAdapter;
|
|
19274
19376
|
invites: InvitesAdapter;
|
|
19275
19377
|
keys: KeysAdapter;
|
|
@@ -19740,6 +19842,7 @@ declare const sqlHookSchema: z.ZodObject<{
|
|
|
19740
19842
|
url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19741
19843
|
form_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19742
19844
|
template_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19845
|
+
code_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19743
19846
|
}, "strip", z.ZodTypeAny, {
|
|
19744
19847
|
tenant_id: string;
|
|
19745
19848
|
created_at_ts: number;
|
|
@@ -19752,6 +19855,7 @@ declare const sqlHookSchema: z.ZodObject<{
|
|
|
19752
19855
|
url?: string | null | undefined;
|
|
19753
19856
|
form_id?: string | null | undefined;
|
|
19754
19857
|
template_id?: string | null | undefined;
|
|
19858
|
+
code_id?: string | null | undefined;
|
|
19755
19859
|
}, {
|
|
19756
19860
|
tenant_id: string;
|
|
19757
19861
|
created_at_ts: number;
|
|
@@ -19764,6 +19868,29 @@ declare const sqlHookSchema: z.ZodObject<{
|
|
|
19764
19868
|
url?: string | null | undefined;
|
|
19765
19869
|
form_id?: string | null | undefined;
|
|
19766
19870
|
template_id?: string | null | undefined;
|
|
19871
|
+
code_id?: string | null | undefined;
|
|
19872
|
+
}>;
|
|
19873
|
+
declare const sqlHookCodeSchema: z.ZodObject<{
|
|
19874
|
+
id: z.ZodString;
|
|
19875
|
+
tenant_id: z.ZodString;
|
|
19876
|
+
code: z.ZodString;
|
|
19877
|
+
secrets: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19878
|
+
created_at_ts: z.ZodNumber;
|
|
19879
|
+
updated_at_ts: z.ZodNumber;
|
|
19880
|
+
}, "strip", z.ZodTypeAny, {
|
|
19881
|
+
code: string;
|
|
19882
|
+
tenant_id: string;
|
|
19883
|
+
created_at_ts: number;
|
|
19884
|
+
updated_at_ts: number;
|
|
19885
|
+
id: string;
|
|
19886
|
+
secrets?: string | null | undefined;
|
|
19887
|
+
}, {
|
|
19888
|
+
code: string;
|
|
19889
|
+
tenant_id: string;
|
|
19890
|
+
created_at_ts: number;
|
|
19891
|
+
updated_at_ts: number;
|
|
19892
|
+
id: string;
|
|
19893
|
+
secrets?: string | null | undefined;
|
|
19767
19894
|
}>;
|
|
19768
19895
|
declare const sqlEmailProvidersSchema: z.ZodObject<{
|
|
19769
19896
|
tenant_id: z.ZodString;
|
|
@@ -21492,6 +21619,7 @@ export interface Database {
|
|
|
21492
21619
|
custom_domains: z.infer<typeof sqlCustomDomainSchema>;
|
|
21493
21620
|
email_providers: z.infer<typeof sqlEmailProvidersSchema>;
|
|
21494
21621
|
forms: z.infer<typeof sqlFormSchema>;
|
|
21622
|
+
hook_code: z.infer<typeof sqlHookCodeSchema>;
|
|
21495
21623
|
hooks: z.infer<typeof sqlHookSchema>;
|
|
21496
21624
|
keys: SigningKey & {
|
|
21497
21625
|
created_at: string;
|