@authhero/kysely-adapter 0.7.10 → 0.7.11

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.
@@ -3189,7 +3189,7 @@ const pr = i.enum([
3189
3189
  "password_reset",
3190
3190
  "email_verification",
3191
3191
  "otp",
3192
- "oauth2",
3192
+ "authorization_code",
3193
3193
  "oauth2_state",
3194
3194
  "ticket"
3195
3195
  ]), hr = i.object({
@@ -3204,7 +3204,8 @@ const pr = i.enum([
3204
3204
  }),
3205
3205
  code_type: pr,
3206
3206
  expires_at: i.string(),
3207
- used_at: i.string().optional()
3207
+ used_at: i.string().optional(),
3208
+ user_id: i.string().optional()
3208
3209
  }), fr = i.object({
3209
3210
  ...hr.shape,
3210
3211
  created_at: i.string()
@@ -4093,8 +4094,10 @@ function ya(n) {
4093
4094
  }
4094
4095
  function va(n) {
4095
4096
  return async (e, t, s) => {
4096
- const r = await n.selectFrom("codes").where("codes.code_id", "=", t).where("codes.code_type", "=", s).where("codes.expires_at", ">", (/* @__PURE__ */ new Date()).toISOString()).selectAll().executeTakeFirst();
4097
- return r ? R(r) : null;
4097
+ let r = n.selectFrom("codes").where("codes.code_id", "=", t).where("codes.code_type", "=", s).where("codes.expires_at", ">", (/* @__PURE__ */ new Date()).toISOString());
4098
+ e.length && (r = r.where("codes.tenant_id", "=", e));
4099
+ const a = await r.selectAll().executeTakeFirst();
4100
+ return a ? R(a) : null;
4098
4101
  };
4099
4102
  }
4100
4103
  function wa(n) {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "0.7.10",
14
+ "version": "0.7.11",
15
15
  "files": [
16
16
  "dist"
17
17
  ],
@@ -41,7 +41,7 @@
41
41
  "kysely-bun-sqlite": "^0.3.2",
42
42
  "kysely-planetscale": "^1.4.0",
43
43
  "nanoid": "^5.0.7",
44
- "@authhero/adapter-interfaces": "^0.11.6"
44
+ "@authhero/adapter-interfaces": "^0.11.7"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts",