@authhero/kysely-adapter 10.132.3 → 10.133.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.
@@ -2464,7 +2464,7 @@ export type ClientRegistrationToken = z.infer<typeof clientRegistrationTokenSche
2464
2464
  declare enum AuthorizationResponseType {
2465
2465
  TOKEN = "token",
2466
2466
  ID_TOKEN = "id_token",
2467
- TOKEN_ID_TOKEN = "token id_token",
2467
+ TOKEN_ID_TOKEN = "id_token token",
2468
2468
  CODE = "code"
2469
2469
  }
2470
2470
  declare enum AuthorizationResponseMode {
@@ -16957,6 +16957,7 @@ declare const sessionSchema: z.ZodObject<{
16957
16957
  export type Session = z.infer<typeof sessionSchema>;
16958
16958
  declare const signingKeySchema: z.ZodObject<{
16959
16959
  kid: z.ZodString;
16960
+ tenant_id: z.ZodOptional<z.ZodString>;
16960
16961
  cert: z.ZodString;
16961
16962
  fingerprint: z.ZodString;
16962
16963
  thumbprint: z.ZodString;
@@ -16979,6 +16980,7 @@ declare const signingKeySchema: z.ZodObject<{
16979
16980
  cert: string;
16980
16981
  fingerprint: string;
16981
16982
  thumbprint: string;
16983
+ tenant_id?: string | undefined;
16982
16984
  connection?: string | undefined;
16983
16985
  revoked_at?: string | undefined;
16984
16986
  pkcs7?: string | undefined;
@@ -16994,6 +16996,7 @@ declare const signingKeySchema: z.ZodObject<{
16994
16996
  cert: string;
16995
16997
  fingerprint: string;
16996
16998
  thumbprint: string;
16999
+ tenant_id?: string | undefined;
16997
17000
  connection?: string | undefined;
16998
17001
  revoked_at?: string | undefined;
16999
17002
  pkcs7?: string | undefined;
@@ -18877,6 +18880,66 @@ declare const emailProviderSchema: z.ZodObject<{
18877
18880
  settings?: {} | undefined;
18878
18881
  }>;
18879
18882
  export type EmailProvider = z.infer<typeof emailProviderSchema>;
18883
+ declare const emailTemplateNameSchema: z.ZodEnum<[
18884
+ "verify_email",
18885
+ "verify_email_by_code",
18886
+ "reset_email",
18887
+ "reset_email_by_code",
18888
+ "welcome_email",
18889
+ "blocked_account",
18890
+ "stolen_credentials",
18891
+ "enrollment_email",
18892
+ "mfa_oob_code",
18893
+ "change_password",
18894
+ "password_reset",
18895
+ "user_invitation"
18896
+ ]>;
18897
+ export type EmailTemplateName = z.infer<typeof emailTemplateNameSchema>;
18898
+ declare const emailTemplateSchema: z.ZodObject<{
18899
+ template: z.ZodEnum<[
18900
+ "verify_email",
18901
+ "verify_email_by_code",
18902
+ "reset_email",
18903
+ "reset_email_by_code",
18904
+ "welcome_email",
18905
+ "blocked_account",
18906
+ "stolen_credentials",
18907
+ "enrollment_email",
18908
+ "mfa_oob_code",
18909
+ "change_password",
18910
+ "password_reset",
18911
+ "user_invitation"
18912
+ ]>;
18913
+ body: z.ZodString;
18914
+ from: z.ZodString;
18915
+ subject: z.ZodString;
18916
+ syntax: z.ZodDefault<z.ZodLiteral<"liquid">>;
18917
+ resultUrl: z.ZodOptional<z.ZodString>;
18918
+ urlLifetimeInSeconds: z.ZodOptional<z.ZodNumber>;
18919
+ includeEmailInRedirect: z.ZodDefault<z.ZodBoolean>;
18920
+ enabled: z.ZodDefault<z.ZodBoolean>;
18921
+ }, "strip", z.ZodTypeAny, {
18922
+ body: string;
18923
+ from: string;
18924
+ enabled: boolean;
18925
+ template: "verify_email" | "password_reset" | "change_password" | "verify_email_by_code" | "reset_email" | "reset_email_by_code" | "welcome_email" | "blocked_account" | "stolen_credentials" | "enrollment_email" | "mfa_oob_code" | "user_invitation";
18926
+ subject: string;
18927
+ syntax: "liquid";
18928
+ includeEmailInRedirect: boolean;
18929
+ resultUrl?: string | undefined;
18930
+ urlLifetimeInSeconds?: number | undefined;
18931
+ }, {
18932
+ body: string;
18933
+ from: string;
18934
+ template: "verify_email" | "password_reset" | "change_password" | "verify_email_by_code" | "reset_email" | "reset_email_by_code" | "welcome_email" | "blocked_account" | "stolen_credentials" | "enrollment_email" | "mfa_oob_code" | "user_invitation";
18935
+ subject: string;
18936
+ enabled?: boolean | undefined;
18937
+ syntax?: "liquid" | undefined;
18938
+ resultUrl?: string | undefined;
18939
+ urlLifetimeInSeconds?: number | undefined;
18940
+ includeEmailInRedirect?: boolean | undefined;
18941
+ }>;
18942
+ export type EmailTemplate = z.infer<typeof emailTemplateSchema>;
18880
18943
  declare const refreshTokenInsertSchema: z.ZodObject<{
18881
18944
  id: z.ZodString;
18882
18945
  login_id: z.ZodString;
@@ -20275,6 +20338,13 @@ export interface EmailProvidersAdapter {
20275
20338
  get: (tenant_id: string) => Promise<EmailProvider | null>;
20276
20339
  remove: (tenant_id: string) => Promise<void>;
20277
20340
  }
20341
+ export interface EmailTemplatesAdapter {
20342
+ get: (tenant_id: string, templateName: EmailTemplateName) => Promise<EmailTemplate | null>;
20343
+ list: (tenant_id: string) => Promise<EmailTemplate[]>;
20344
+ create: (tenant_id: string, template: EmailTemplate) => Promise<EmailTemplate>;
20345
+ update: (tenant_id: string, templateName: EmailTemplateName, template: Partial<EmailTemplate>) => Promise<boolean>;
20346
+ remove: (tenant_id: string, templateName: EmailTemplateName) => Promise<boolean>;
20347
+ }
20278
20348
  export interface ListRefreshTokenResponse extends Totals {
20279
20349
  refresh_tokens: RefreshToken[];
20280
20350
  }
@@ -20601,6 +20671,7 @@ export interface DataAdapters {
20601
20671
  connections: ConnectionsAdapter;
20602
20672
  customDomains: CustomDomainsAdapter;
20603
20673
  emailProviders: EmailProvidersAdapter;
20674
+ emailTemplates: EmailTemplatesAdapter;
20604
20675
  flows: FlowsAdapter;
20605
20676
  forms: FormsAdapter;
20606
20677
  geo?: GeoAdapter;
@@ -21220,6 +21291,46 @@ declare const sqlEmailProvidersSchema: z.ZodObject<{
21220
21291
  settings: string;
21221
21292
  default_from_address?: string | undefined;
21222
21293
  }>;
21294
+ declare const sqlEmailTemplatesSchema: z.ZodObject<{
21295
+ tenant_id: z.ZodString;
21296
+ template: z.ZodString;
21297
+ body: z.ZodString;
21298
+ from: z.ZodString;
21299
+ subject: z.ZodString;
21300
+ syntax: z.ZodString;
21301
+ result_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21302
+ url_lifetime_in_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
21303
+ include_email_in_redirect: z.ZodNumber;
21304
+ enabled: z.ZodNumber;
21305
+ created_at: z.ZodString;
21306
+ updated_at: z.ZodString;
21307
+ }, "strip", z.ZodTypeAny, {
21308
+ tenant_id: string;
21309
+ created_at: string;
21310
+ updated_at: string;
21311
+ body: string;
21312
+ enabled: number;
21313
+ template: string;
21314
+ from: string;
21315
+ subject: string;
21316
+ syntax: string;
21317
+ include_email_in_redirect: number;
21318
+ result_url?: string | null | undefined;
21319
+ url_lifetime_in_seconds?: number | null | undefined;
21320
+ }, {
21321
+ tenant_id: string;
21322
+ created_at: string;
21323
+ updated_at: string;
21324
+ body: string;
21325
+ enabled: number;
21326
+ template: string;
21327
+ from: string;
21328
+ subject: string;
21329
+ syntax: string;
21330
+ include_email_in_redirect: number;
21331
+ result_url?: string | null | undefined;
21332
+ url_lifetime_in_seconds?: number | null | undefined;
21333
+ }>;
21223
21334
  declare const sqlSessionSchema: z.ZodObject<Omit<{
21224
21335
  id: z.ZodString;
21225
21336
  revoked_at: z.ZodOptional<z.ZodString>;
@@ -23321,6 +23432,7 @@ export interface Database {
23321
23432
  connections: z.infer<typeof sqlConnectionSchema>;
23322
23433
  custom_domains: z.infer<typeof sqlCustomDomainSchema>;
23323
23434
  email_providers: z.infer<typeof sqlEmailProvidersSchema>;
23435
+ email_templates: z.infer<typeof sqlEmailTemplatesSchema>;
23324
23436
  forms: z.infer<typeof sqlFormSchema>;
23325
23437
  hook_code: z.infer<typeof sqlHookCodeSchema>;
23326
23438
  hooks: z.infer<typeof sqlHookSchema>;