@authhero/drizzle 0.33.0 → 0.34.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.
@@ -17,4 +17,4 @@
17
17
  "breakpoints": true
18
18
  }
19
19
  ]
20
- }
20
+ }
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.33.0",
14
+ "version": "0.34.0",
15
15
  "files": [
16
16
  "dist",
17
17
  "src/schema",
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "drizzle-orm": "^0.44.2",
36
36
  "nanoid": "^5.0.8",
37
- "@authhero/adapter-interfaces": "0.155.0"
37
+ "@authhero/adapter-interfaces": "1.0.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hono/zod-openapi": "^0.19.2",
@@ -237,23 +237,43 @@ export const emailProviders = sqliteTable("email_providers", {
237
237
  updated_at: text("updated_at", { length: 35 }).notNull(),
238
238
  });
239
239
 
240
- export const hooks = sqliteTable("hooks", {
241
- hook_id: text("hook_id", { length: 21 }).primaryKey(),
242
- tenant_id: text("tenant_id", { length: 191 })
243
- .notNull()
244
- .references(() => tenants.id, { onDelete: "cascade" }),
245
- url: text("url", { length: 512 }), // nullable - only required for webhook type hooks
246
- trigger_id: text("trigger_id", { length: 255 }).notNull(),
247
- enabled: integer("enabled", { mode: "boolean" }).notNull(),
248
- created_at_ts: integer("created_at_ts").notNull(),
249
- updated_at_ts: integer("updated_at_ts").notNull(),
250
- synchronous: integer("synchronous", { mode: "boolean" })
251
- .notNull()
252
- .default(false),
253
- priority: integer("priority"),
254
- form_id: text("form_id", { length: 128 }), // only required for form type hooks
255
- template_id: text("template_id", { length: 64 }), // only required for template type hooks
256
- });
240
+ export const hooks = sqliteTable(
241
+ "hooks",
242
+ {
243
+ hook_id: text("hook_id", { length: 21 }).primaryKey(),
244
+ tenant_id: text("tenant_id", { length: 191 })
245
+ .notNull()
246
+ .references(() => tenants.id, { onDelete: "cascade" }),
247
+ url: text("url", { length: 512 }), // nullable - only required for webhook type hooks
248
+ trigger_id: text("trigger_id", { length: 255 }).notNull(),
249
+ enabled: integer("enabled", { mode: "boolean" }).notNull(),
250
+ created_at_ts: integer("created_at_ts").notNull(),
251
+ updated_at_ts: integer("updated_at_ts").notNull(),
252
+ synchronous: integer("synchronous", { mode: "boolean" })
253
+ .notNull()
254
+ .default(false),
255
+ priority: integer("priority"),
256
+ form_id: text("form_id", { length: 128 }), // only required for form type hooks
257
+ template_id: text("template_id", { length: 64 }), // only required for template type hooks
258
+ code_id: text("code_id", { length: 21 }), // only required for code type hooks
259
+ },
260
+ (table) => [index("hooks_tenant_id_idx").on(table.tenant_id)],
261
+ );
262
+
263
+ export const hookCode = sqliteTable(
264
+ "hook_code",
265
+ {
266
+ id: text("id", { length: 21 }).primaryKey(),
267
+ tenant_id: text("tenant_id", { length: 191 })
268
+ .notNull()
269
+ .references(() => tenants.id, { onDelete: "cascade" }),
270
+ code: text("code").notNull(),
271
+ secrets: text("secrets"),
272
+ created_at_ts: integer("created_at_ts").notNull(),
273
+ updated_at_ts: integer("updated_at_ts").notNull(),
274
+ },
275
+ (table) => [index("hook_code_tenant_id_idx").on(table.tenant_id)],
276
+ );
257
277
 
258
278
  export const keys = sqliteTable("keys", {
259
279
  kid: text("kid", { length: 255 }).primaryKey(),