@authhero/kysely-adapter 12.6.0 → 12.6.2

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.
@@ -3,10 +3,10 @@ import { Kysely } from "kysely";
3
3
  import { Database } from "../db";
4
4
  export declare function create(db: Kysely<Database>): (tenant_id: string, code: CodeInsert) => Promise<{
5
5
  code_id: string;
6
- login_id: string;
7
- code_type: "otp" | "password_reset" | "email_verification" | "mfa_otp" | "authorization_code" | "oauth2_state" | "ticket";
6
+ code_type: "otp" | "password_reset" | "email_verification" | "mfa_otp" | "authorization_code" | "oauth2_state" | "ticket" | "client_assertion_jti";
8
7
  expires_at: string;
9
8
  created_at: string;
9
+ login_id?: string | undefined;
10
10
  connection_id?: string | undefined;
11
11
  code_verifier?: string | undefined;
12
12
  code_challenge?: string | undefined;
@@ -3,22 +3,12 @@ import { Database } from "../db";
3
3
  export declare function getByDomain(db: Kysely<Database>): (domain: string) => Promise<{
4
4
  primary: boolean;
5
5
  domain_metadata: undefined;
6
+ verification: undefined;
6
7
  tenant_id: string;
7
8
  created_at: string;
8
9
  updated_at: string;
9
10
  verification_method: "txt" | undefined;
10
11
  status: "pending" | "disabled" | "pending_verification" | "ready";
11
- verification: {
12
- methods: ({
13
- name: "txt";
14
- record: string;
15
- domain: string;
16
- } | {
17
- name: "http";
18
- http_body: string;
19
- http_url: string;
20
- })[];
21
- } | undefined;
22
12
  type: "auth0_managed_certs" | "self_managed_certs";
23
13
  domain: string;
24
14
  custom_client_ip_header: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
@@ -285,21 +285,11 @@ declare const sqlCustomDomainSchema: z.ZodObject<{
285
285
  ready: "ready";
286
286
  }>;
287
287
  origin_domain_name: z.ZodOptional<z.ZodString>;
288
- verification: z.ZodOptional<z.ZodObject<{
289
- methods: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
290
- name: z.ZodLiteral<"txt">;
291
- record: z.ZodString;
292
- domain: z.ZodString;
293
- }, z.core.$strip>, z.ZodObject<{
294
- name: z.ZodLiteral<"http">;
295
- http_body: z.ZodString;
296
- http_url: z.ZodString;
297
- }, z.core.$strip>], "name">>;
298
- }, z.core.$strip>>;
299
288
  tls_policy: z.ZodOptional<z.ZodString>;
300
289
  primary: z.ZodNumber;
301
290
  tenant_id: z.ZodString;
302
291
  domain_metadata: z.ZodOptional<z.ZodString>;
292
+ verification: z.ZodOptional<z.ZodString>;
303
293
  created_at: z.ZodString;
304
294
  updated_at: z.ZodString;
305
295
  }, z.core.$strip>;
@@ -6,6 +6,11 @@ import { Database } from "../db";
6
6
  * next_retry_at. Scoped to tenantId so management-API callers can't reach
7
7
  * into another tenant's dead-letter queue.
8
8
  *
9
+ * The claim is released too. `deadLetter` leaves `claimed_by` /
10
+ * `claim_expires_at` set from the relay pass that retired the event (unlike
11
+ * `markRetry`, which clears them), so a replay inside the 30s lease window
12
+ * would otherwise be skipped by `getUnprocessed` until the lease aged out.
13
+ *
9
14
  * Returns true if a row was updated (matched id + tenant + was dead-lettered),
10
15
  * false otherwise (so the route handler's 404 branch still works).
11
16
  */
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { RefreshToken, UpdateRefreshTokenOptions } from "@authhero/adapter-interfaces";
4
- export declare function update(db: Kysely<Database>): (tenant_id: string, id: string, refresh_token: Partial<RefreshToken>, options?: UpdateRefreshTokenOptions) => Promise<boolean>;
3
+ import { RefreshTokenUpdate, UpdateRefreshTokenOptions } from "@authhero/adapter-interfaces";
4
+ export declare function update(db: Kysely<Database>): (tenant_id: string, id: string, refresh_token: RefreshTokenUpdate, options?: UpdateRefreshTokenOptions) => Promise<boolean>;