@authhero/drizzle 1.11.0 → 1.13.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.
@@ -71,6 +71,20 @@
71
71
  "when": 1790333364216,
72
72
  "tag": "0009_token_exchange_profiles",
73
73
  "breakpoints": true
74
+ },
75
+ {
76
+ "idx": 10,
77
+ "version": "6",
78
+ "when": 1791894544632,
79
+ "tag": "0010_prompt_partials",
80
+ "breakpoints": true
81
+ },
82
+ {
83
+ "idx": 11,
84
+ "version": "6",
85
+ "when": 1792056769015,
86
+ "tag": "0011_org_connections_log_streams_migration_sources",
87
+ "breakpoints": true
74
88
  }
75
89
  ]
76
90
  }
package/package.json CHANGED
@@ -9,9 +9,9 @@
9
9
  "homepage": "https://authhero.net",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/markusahlstrand/authhero"
12
+ "url": "https://github.com/sesamyab/authhero"
13
13
  },
14
- "version": "1.11.0",
14
+ "version": "1.13.0",
15
15
  "files": [
16
16
  "dist",
17
17
  "src/schema",
@@ -35,8 +35,8 @@
35
35
  "dependencies": {
36
36
  "drizzle-orm": "^0.45.2",
37
37
  "nanoid": "^5.1.11",
38
- "@authhero/adapter-interfaces": "4.19.0",
39
- "@authhero/proxy": "0.11.5"
38
+ "@authhero/proxy": "0.11.6",
39
+ "@authhero/adapter-interfaces": "4.20.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@hono/zod-openapi": "^1.4.0",
@@ -345,3 +345,17 @@ export const customText = sqliteTable(
345
345
  primaryKey({ columns: [table.tenant_id, table.prompt, table.language] }),
346
346
  ],
347
347
  );
348
+
349
+ export const promptPartials = sqliteTable(
350
+ "prompt_partials",
351
+ {
352
+ tenant_id: text("tenant_id", { length: 191 })
353
+ .notNull()
354
+ .references(() => tenants.id, { onDelete: "cascade" }),
355
+ prompt: text("prompt", { length: 64 }).notNull(),
356
+ body: text("body").notNull(),
357
+ created_at_ts: integer("created_at_ts").notNull(),
358
+ updated_at_ts: integer("updated_at_ts").notNull(),
359
+ },
360
+ (table) => [primaryKey({ columns: [table.tenant_id, table.prompt] })],
361
+ );
@@ -52,3 +52,9 @@ export * from "./scim";
52
52
 
53
53
  // Custom Token Exchange profiles (#1417)
54
54
  export * from "./tokenExchangeProfiles";
55
+
56
+ // Log streams
57
+ export * from "./logStreams";
58
+
59
+ // Lazy refresh-token migration sources
60
+ export * from "./migrationSources";
@@ -0,0 +1,18 @@
1
+ import { sqliteTable, text, integer, index } from "drizzle-orm/sqlite-core";
2
+
3
+ export const logStreams = sqliteTable(
4
+ "log_streams",
5
+ {
6
+ id: text("id", { length: 64 }).primaryKey(),
7
+ tenant_id: text("tenant_id", { length: 191 }).notNull(),
8
+ name: text("name", { length: 255 }).notNull(),
9
+ type: text("type", { length: 64 }).notNull(),
10
+ status: text("status", { length: 32 }).notNull(),
11
+ sink: text("sink").notNull(),
12
+ filters: text("filters"),
13
+ is_priority: integer("is_priority"),
14
+ created_at: text("created_at", { length: 35 }).notNull(),
15
+ updated_at: text("updated_at", { length: 35 }).notNull(),
16
+ },
17
+ (table) => [index("idx_log_streams_tenant_id").on(table.tenant_id)],
18
+ );
@@ -0,0 +1,17 @@
1
+ import { sqliteTable, text, integer, index } from "drizzle-orm/sqlite-core";
2
+
3
+ export const migrationSources = sqliteTable(
4
+ "migration_sources",
5
+ {
6
+ id: text("id", { length: 64 }).primaryKey(),
7
+ tenant_id: text("tenant_id", { length: 191 }).notNull(),
8
+ name: text("name", { length: 255 }).notNull(),
9
+ provider: text("provider", { length: 32 }).notNull(),
10
+ connection: text("connection", { length: 255 }).notNull(),
11
+ enabled: integer("enabled").notNull(),
12
+ credentials: text("credentials").notNull(),
13
+ created_at: text("created_at", { length: 35 }).notNull(),
14
+ updated_at: text("updated_at", { length: 35 }).notNull(),
15
+ },
16
+ (table) => [index("idx_migration_sources_tenant_id").on(table.tenant_id)],
17
+ );
@@ -4,6 +4,7 @@ import {
4
4
  integer,
5
5
  uniqueIndex,
6
6
  index,
7
+ primaryKey,
7
8
  } from "drizzle-orm/sqlite-core";
8
9
 
9
10
  export const organizations = sqliteTable(
@@ -72,3 +73,25 @@ export const invites = sqliteTable(
72
73
  index("idx_invites_tenant_created").on(table.tenant_id, table.created_at),
73
74
  ],
74
75
  );
76
+
77
+ // Junction table: organizations ↔ connections ("enabled_connections").
78
+ export const organizationConnections = sqliteTable(
79
+ "organization_connections",
80
+ {
81
+ tenant_id: text("tenant_id", { length: 191 }).notNull(),
82
+ organization_id: text("organization_id", { length: 21 }).notNull(),
83
+ connection_id: text("connection_id", { length: 191 }).notNull(),
84
+ assign_membership_on_login: integer("assign_membership_on_login")
85
+ .notNull()
86
+ .default(0),
87
+ show_as_button: integer("show_as_button").notNull().default(1),
88
+ is_signup_enabled: integer("is_signup_enabled").notNull().default(1),
89
+ created_at: text("created_at", { length: 35 }).notNull(),
90
+ updated_at: text("updated_at", { length: 35 }).notNull(),
91
+ },
92
+ (table) => [
93
+ primaryKey({
94
+ columns: [table.tenant_id, table.organization_id, table.connection_id],
95
+ }),
96
+ ],
97
+ );