@authhero/kysely-adapter 10.99.0 → 10.100.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.
@@ -14790,6 +14790,7 @@ export type EmailProvider = z.infer<typeof emailProviderSchema>;
14790
14790
  declare const refreshTokenInsertSchema: z.ZodObject<{
14791
14791
  id: z.ZodString;
14792
14792
  session_id: z.ZodString;
14793
+ login_id: z.ZodOptional<z.ZodString>;
14793
14794
  user_id: z.ZodString;
14794
14795
  client_id: z.ZodString;
14795
14796
  expires_at: z.ZodOptional<z.ZodString>;
@@ -14846,6 +14847,7 @@ declare const refreshTokenInsertSchema: z.ZodObject<{
14846
14847
  scopes: string;
14847
14848
  }[];
14848
14849
  rotating: boolean;
14850
+ login_id?: string | undefined;
14849
14851
  expires_at?: string | undefined;
14850
14852
  idle_expires_at?: string | undefined;
14851
14853
  last_exchanged_at?: string | undefined;
@@ -14867,6 +14869,7 @@ declare const refreshTokenInsertSchema: z.ZodObject<{
14867
14869
  scopes: string;
14868
14870
  }[];
14869
14871
  rotating: boolean;
14872
+ login_id?: string | undefined;
14870
14873
  expires_at?: string | undefined;
14871
14874
  idle_expires_at?: string | undefined;
14872
14875
  last_exchanged_at?: string | undefined;
@@ -14875,6 +14878,7 @@ export type RefreshTokenInsert = z.infer<typeof refreshTokenInsertSchema>;
14875
14878
  declare const refreshTokenSchema: z.ZodObject<{
14876
14879
  id: z.ZodString;
14877
14880
  session_id: z.ZodString;
14881
+ login_id: z.ZodOptional<z.ZodString>;
14878
14882
  user_id: z.ZodString;
14879
14883
  client_id: z.ZodString;
14880
14884
  expires_at: z.ZodOptional<z.ZodString>;
@@ -14933,6 +14937,7 @@ declare const refreshTokenSchema: z.ZodObject<{
14933
14937
  scopes: string;
14934
14938
  }[];
14935
14939
  rotating: boolean;
14940
+ login_id?: string | undefined;
14936
14941
  expires_at?: string | undefined;
14937
14942
  idle_expires_at?: string | undefined;
14938
14943
  last_exchanged_at?: string | undefined;
@@ -14955,6 +14960,7 @@ declare const refreshTokenSchema: z.ZodObject<{
14955
14960
  scopes: string;
14956
14961
  }[];
14957
14962
  rotating: boolean;
14963
+ login_id?: string | undefined;
14958
14964
  expires_at?: string | undefined;
14959
14965
  idle_expires_at?: string | undefined;
14960
14966
  last_exchanged_at?: string | undefined;
@@ -16659,6 +16665,7 @@ declare const sqlSessionSchema: z.ZodObject<Omit<{
16659
16665
  declare const sqlRefreshTokensSchema: z.ZodObject<Omit<{
16660
16666
  id: z.ZodString;
16661
16667
  session_id: z.ZodString;
16668
+ login_id: z.ZodOptional<z.ZodString>;
16662
16669
  user_id: z.ZodString;
16663
16670
  client_id: z.ZodString;
16664
16671
  expires_at: z.ZodOptional<z.ZodString>;
@@ -16719,6 +16726,7 @@ declare const sqlRefreshTokensSchema: z.ZodObject<Omit<{
16719
16726
  rotating: number;
16720
16727
  expires_at_ts?: number | null | undefined;
16721
16728
  idle_expires_at_ts?: number | null | undefined;
16729
+ login_id?: string | undefined;
16722
16730
  last_exchanged_at_ts?: number | null | undefined;
16723
16731
  }, {
16724
16732
  tenant_id: string;
@@ -16732,6 +16740,7 @@ declare const sqlRefreshTokensSchema: z.ZodObject<Omit<{
16732
16740
  rotating: number;
16733
16741
  expires_at_ts?: number | null | undefined;
16734
16742
  idle_expires_at_ts?: number | null | undefined;
16743
+ login_id?: string | undefined;
16735
16744
  last_exchanged_at_ts?: number | null | undefined;
16736
16745
  }>;
16737
16746
  declare const sqlCustomDomainSchema: z.ZodObject<{
@@ -2231,7 +2231,7 @@ function Hs(t) {
2231
2231
  return async (e, a = {}) => {
2232
2232
  const { page: n = 0, per_page: r = 50, include_totals: o = !1, sort: s, q: l } = a;
2233
2233
  let u = t.selectFrom("refresh_tokens").where("refresh_tokens.tenant_id", "=", e);
2234
- l && (u = q(t, u, l, ["token", "session_id"]));
2234
+ l && (u = q(t, u, l, ["token", "session_id", "login_id"]));
2235
2235
  let _ = u;
2236
2236
  if (s && s.sort_by) {
2237
2237
  const { ref: y } = t.dynamic;
@@ -10381,6 +10381,17 @@ const jp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10381
10381
  __proto__: null,
10382
10382
  down: Mp,
10383
10383
  up: Lp
10384
+ }, Symbol.toStringTag, { value: "Module" }));
10385
+ async function Jp(t) {
10386
+ await t.schema.alterTable("refresh_tokens").addColumn("login_id", "varchar(26)").execute(), await t.schema.createIndex("idx_refresh_tokens_login_id").on("refresh_tokens").column("login_id").execute();
10387
+ }
10388
+ async function qp(t) {
10389
+ await t.schema.dropIndex("idx_refresh_tokens_login_id").execute(), await t.schema.alterTable("refresh_tokens").dropColumn("login_id").execute();
10390
+ }
10391
+ const Wp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10392
+ __proto__: null,
10393
+ down: qp,
10394
+ up: Jp
10384
10395
  }, Symbol.toStringTag, { value: "Module" })), dr = {
10385
10396
  m1_init: Tl,
10386
10397
  m2_magicLink: bl,
@@ -10511,9 +10522,10 @@ const jp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10511
10522
  o029_guardian_mfa: Ip,
10512
10523
  o030_add_template_id_to_hooks: Pp,
10513
10524
  o031_hooks_cleanup: Fp,
10514
- o032_unique_username_provider: jp
10525
+ o032_unique_username_provider: jp,
10526
+ o033_add_login_id_to_refresh_tokens: Wp
10515
10527
  };
10516
- async function Bp(t, e = !1) {
10528
+ async function Qp(t, e = !1) {
10517
10529
  e && console.log("migrating...");
10518
10530
  const a = new ir(dr), n = new Kn({
10519
10531
  db: t,
@@ -10526,7 +10538,7 @@ async function Bp(t, e = !1) {
10526
10538
  }), r)
10527
10539
  throw console.error("failed to migrate"), console.error(r), r;
10528
10540
  }
10529
- async function Up(t) {
10541
+ async function Vp(t) {
10530
10542
  console.log("migrating...");
10531
10543
  const e = new ir(dr), a = new Kn({
10532
10544
  db: t,
@@ -10537,7 +10549,7 @@ async function Up(t) {
10537
10549
  }), n)
10538
10550
  throw console.error("failed to migrate"), console.error(n), n;
10539
10551
  }
10540
- function Kp(t, e = { useTransactions: !0 }) {
10552
+ function Gp(t, e = { useTransactions: !0 }) {
10541
10553
  return {
10542
10554
  branding: ls(t),
10543
10555
  clients: Fo(t),
@@ -10575,7 +10587,7 @@ function Kp(t, e = { useTransactions: !0 }) {
10575
10587
  };
10576
10588
  }
10577
10589
  export {
10578
- Kp as default,
10579
- Up as migrateDown,
10580
- Bp as migrateToLatest
10590
+ Gp as default,
10591
+ Vp as migrateDown,
10592
+ Qp as migrateToLatest
10581
10593
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "10.99.0",
14
+ "version": "10.100.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],
@@ -43,7 +43,7 @@
43
43
  "kysely": "^0.27.4",
44
44
  "nanoid": "^5.0.8",
45
45
  "ulid": "^2.3.0",
46
- "@authhero/adapter-interfaces": "0.137.0"
46
+ "@authhero/adapter-interfaces": "0.138.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@hono/zod-openapi": "^0.19.2",