@auth/drizzle-adapter 0.0.0-manual.ffc00566 → 0.2.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.
package/lib/pg.d.ts CHANGED
@@ -1,2 +1,226 @@
1
- export type DefaultSchema = typeof schema;
1
+ import { PgTableFn } from "drizzle-orm/pg-core";
2
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
3
+ import type { Adapter } from "@auth/core/adapters";
4
+ export declare function createTables(pgTable: PgTableFn): {
5
+ users: import("drizzle-orm/db.d-b9835153").az<{
6
+ name: "users";
7
+ schema: undefined;
8
+ columns: {
9
+ id: import("drizzle-orm/pg-core").PgText<{
10
+ tableName: "users";
11
+ enumValues: [string, ...string[]];
12
+ name: "id";
13
+ data: string;
14
+ driverParam: string;
15
+ hasDefault: false;
16
+ notNull: true;
17
+ }>;
18
+ name: import("drizzle-orm/pg-core").PgText<{
19
+ tableName: "users";
20
+ name: "name";
21
+ data: string;
22
+ enumValues: [string, ...string[]];
23
+ driverParam: string;
24
+ notNull: false;
25
+ hasDefault: false;
26
+ }>;
27
+ email: import("drizzle-orm/pg-core").PgText<{
28
+ tableName: "users";
29
+ enumValues: [string, ...string[]];
30
+ name: "email";
31
+ data: string;
32
+ driverParam: string;
33
+ hasDefault: false;
34
+ notNull: true;
35
+ }>;
36
+ emailVerified: import("drizzle-orm/pg-core").PgTimestamp<{
37
+ tableName: "users";
38
+ name: "emailVerified";
39
+ data: Date;
40
+ driverParam: string;
41
+ notNull: false;
42
+ hasDefault: false;
43
+ }>;
44
+ image: import("drizzle-orm/pg-core").PgText<{
45
+ tableName: "users";
46
+ name: "image";
47
+ data: string;
48
+ enumValues: [string, ...string[]];
49
+ driverParam: string;
50
+ notNull: false;
51
+ hasDefault: false;
52
+ }>;
53
+ };
54
+ }>;
55
+ accounts: import("drizzle-orm/db.d-b9835153").az<{
56
+ name: "accounts";
57
+ schema: undefined;
58
+ columns: {
59
+ userId: import("drizzle-orm/pg-core").PgText<{
60
+ tableName: "accounts";
61
+ enumValues: [string, ...string[]];
62
+ name: "userId";
63
+ data: string;
64
+ driverParam: string;
65
+ hasDefault: false;
66
+ notNull: true;
67
+ }>;
68
+ type: import("drizzle-orm/pg-core").PgText<{
69
+ tableName: "accounts";
70
+ enumValues: [string, ...string[]];
71
+ name: "type";
72
+ data: "email" | "oidc" | "oauth";
73
+ driverParam: string;
74
+ hasDefault: false;
75
+ notNull: true;
76
+ }>;
77
+ provider: import("drizzle-orm/pg-core").PgText<{
78
+ tableName: "accounts";
79
+ enumValues: [string, ...string[]];
80
+ name: "provider";
81
+ data: string;
82
+ driverParam: string;
83
+ hasDefault: false;
84
+ notNull: true;
85
+ }>;
86
+ providerAccountId: import("drizzle-orm/pg-core").PgText<{
87
+ tableName: "accounts";
88
+ enumValues: [string, ...string[]];
89
+ name: "providerAccountId";
90
+ data: string;
91
+ driverParam: string;
92
+ hasDefault: false;
93
+ notNull: true;
94
+ }>;
95
+ refresh_token: import("drizzle-orm/pg-core").PgText<{
96
+ tableName: "accounts";
97
+ name: "refresh_token";
98
+ data: string;
99
+ enumValues: [string, ...string[]];
100
+ driverParam: string;
101
+ notNull: false;
102
+ hasDefault: false;
103
+ }>;
104
+ access_token: import("drizzle-orm/pg-core").PgText<{
105
+ tableName: "accounts";
106
+ name: "access_token";
107
+ data: string;
108
+ enumValues: [string, ...string[]];
109
+ driverParam: string;
110
+ notNull: false;
111
+ hasDefault: false;
112
+ }>;
113
+ expires_at: import("drizzle-orm/pg-core").PgInteger<{
114
+ tableName: "accounts";
115
+ name: "expires_at";
116
+ data: number;
117
+ driverParam: string | number;
118
+ hasDefault: false;
119
+ notNull: false;
120
+ }>;
121
+ token_type: import("drizzle-orm/pg-core").PgText<{
122
+ tableName: "accounts";
123
+ name: "token_type";
124
+ data: string;
125
+ enumValues: [string, ...string[]];
126
+ driverParam: string;
127
+ notNull: false;
128
+ hasDefault: false;
129
+ }>;
130
+ scope: import("drizzle-orm/pg-core").PgText<{
131
+ tableName: "accounts";
132
+ name: "scope";
133
+ data: string;
134
+ enumValues: [string, ...string[]];
135
+ driverParam: string;
136
+ notNull: false;
137
+ hasDefault: false;
138
+ }>;
139
+ id_token: import("drizzle-orm/pg-core").PgText<{
140
+ tableName: "accounts";
141
+ name: "id_token";
142
+ data: string;
143
+ enumValues: [string, ...string[]];
144
+ driverParam: string;
145
+ notNull: false;
146
+ hasDefault: false;
147
+ }>;
148
+ session_state: import("drizzle-orm/pg-core").PgText<{
149
+ tableName: "accounts";
150
+ name: "session_state";
151
+ data: string;
152
+ enumValues: [string, ...string[]];
153
+ driverParam: string;
154
+ notNull: false;
155
+ hasDefault: false;
156
+ }>;
157
+ };
158
+ }>;
159
+ sessions: import("drizzle-orm/db.d-b9835153").az<{
160
+ name: "sessions";
161
+ schema: undefined;
162
+ columns: {
163
+ sessionToken: import("drizzle-orm/pg-core").PgText<{
164
+ tableName: "sessions";
165
+ enumValues: [string, ...string[]];
166
+ name: "sessionToken";
167
+ data: string;
168
+ driverParam: string;
169
+ hasDefault: false;
170
+ notNull: true;
171
+ }>;
172
+ userId: import("drizzle-orm/pg-core").PgText<{
173
+ tableName: "sessions";
174
+ enumValues: [string, ...string[]];
175
+ name: "userId";
176
+ data: string;
177
+ driverParam: string;
178
+ hasDefault: false;
179
+ notNull: true;
180
+ }>;
181
+ expires: import("drizzle-orm/pg-core").PgTimestamp<{
182
+ tableName: "sessions";
183
+ name: "expires";
184
+ data: Date;
185
+ driverParam: string;
186
+ hasDefault: false;
187
+ notNull: true;
188
+ }>;
189
+ };
190
+ }>;
191
+ verificationTokens: import("drizzle-orm/db.d-b9835153").az<{
192
+ name: "verificationToken";
193
+ schema: undefined;
194
+ columns: {
195
+ identifier: import("drizzle-orm/pg-core").PgText<{
196
+ tableName: "verificationToken";
197
+ enumValues: [string, ...string[]];
198
+ name: "identifier";
199
+ data: string;
200
+ driverParam: string;
201
+ hasDefault: false;
202
+ notNull: true;
203
+ }>;
204
+ token: import("drizzle-orm/pg-core").PgText<{
205
+ tableName: "verificationToken";
206
+ enumValues: [string, ...string[]];
207
+ name: "token";
208
+ data: string;
209
+ driverParam: string;
210
+ hasDefault: false;
211
+ notNull: true;
212
+ }>;
213
+ expires: import("drizzle-orm/pg-core").PgTimestamp<{
214
+ tableName: "verificationToken";
215
+ name: "expires";
216
+ data: Date;
217
+ driverParam: string;
218
+ hasDefault: false;
219
+ notNull: true;
220
+ }>;
221
+ };
222
+ }>;
223
+ };
224
+ export type DefaultSchema = ReturnType<typeof createTables>;
225
+ export declare function pgDrizzleAdapter(client: PostgresJsDatabase<Record<string, never>>, tableFn?: PgTableFn<undefined>): Adapter;
2
226
  //# sourceMappingURL=pg.d.ts.map
package/lib/pg.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pg.d.ts","sourceRoot":"","sources":["../src/lib/pg.ts"],"names":[],"mappings":"AAmEA,MAAM,MAAM,aAAa,GAAG,OAAO,MAAM,CAAA"}
1
+ {"version":3,"file":"pg.d.ts","sourceRoot":"","sources":["../src/lib/pg.ts"],"names":[],"mappings":"AACA,OAAO,EAML,SAAS,EACV,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,qBAAqB,CAAA;AAElE,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoD9C;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AAE3D,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,kBAAkB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,EACjD,OAAO,uBAAmB,GACzB,OAAO,CAgKT"}
package/lib/pg.js CHANGED
@@ -1,81 +1,78 @@
1
- import { timestamp, pgTable, text, primaryKey, integer, } from "drizzle-orm/pg-core";
2
1
  import { and, eq } from "drizzle-orm";
3
- /** @internal */
4
- export const users = pgTable("users", {
5
- id: text("id").notNull().primaryKey(),
6
- name: text("name"),
7
- email: text("email").notNull(),
8
- emailVerified: timestamp("emailVerified", { mode: "date" }),
9
- image: text("image"),
10
- });
11
- /** @internal */
12
- export const accounts = pgTable("accounts", {
13
- userId: text("userId")
14
- .notNull()
15
- .references(() => users.id, { onDelete: "cascade" }),
16
- type: text("type").$type().notNull(),
17
- provider: text("provider").notNull(),
18
- providerAccountId: text("providerAccountId").notNull(),
19
- refresh_token: text("refresh_token"),
20
- access_token: text("access_token"),
21
- expires_at: integer("expires_at"),
22
- token_type: text("token_type"),
23
- scope: text("scope"),
24
- id_token: text("id_token"),
25
- session_state: text("session_state"),
26
- }, (account) => ({
27
- compoundKey: primaryKey(account.provider, account.providerAccountId),
28
- }));
29
- /** @internal */
30
- export const sessions = pgTable("sessions", {
31
- sessionToken: text("sessionToken").notNull().primaryKey(),
32
- userId: text("userId")
33
- .notNull()
34
- .references(() => users.id, { onDelete: "cascade" }),
35
- expires: timestamp("expires", { mode: "date" }).notNull(),
36
- });
37
- /** @internal */
38
- export const verificationTokens = pgTable("verificationToken", {
39
- identifier: text("identifier").notNull(),
40
- token: text("token").notNull(),
41
- expires: timestamp("expires", { mode: "date" }).notNull(),
42
- }, (vt) => ({
43
- compoundKey: primaryKey(vt.identifier, vt.token),
44
- }));
45
- /** @internal */
46
- export const schema = { users, accounts, sessions, verificationTokens };
47
- /** @internal */
48
- export function pgDrizzleAdapter(client) {
2
+ import { timestamp, pgTable as defaultPgTableFn, text, primaryKey, integer, } from "drizzle-orm/pg-core";
3
+ export function createTables(pgTable) {
4
+ const users = pgTable("users", {
5
+ id: text("id").notNull().primaryKey(),
6
+ name: text("name"),
7
+ email: text("email").notNull(),
8
+ emailVerified: timestamp("emailVerified", { mode: "date" }),
9
+ image: text("image"),
10
+ });
11
+ const accounts = pgTable("accounts", {
12
+ userId: text("userId")
13
+ .notNull()
14
+ .references(() => users.id, { onDelete: "cascade" }),
15
+ type: text("type").$type().notNull(),
16
+ provider: text("provider").notNull(),
17
+ providerAccountId: text("providerAccountId").notNull(),
18
+ refresh_token: text("refresh_token"),
19
+ access_token: text("access_token"),
20
+ expires_at: integer("expires_at"),
21
+ token_type: text("token_type"),
22
+ scope: text("scope"),
23
+ id_token: text("id_token"),
24
+ session_state: text("session_state"),
25
+ }, (account) => ({
26
+ compoundKey: primaryKey(account.provider, account.providerAccountId),
27
+ }));
28
+ const sessions = pgTable("sessions", {
29
+ sessionToken: text("sessionToken").notNull().primaryKey(),
30
+ userId: text("userId")
31
+ .notNull()
32
+ .references(() => users.id, { onDelete: "cascade" }),
33
+ expires: timestamp("expires", { mode: "date" }).notNull(),
34
+ });
35
+ const verificationTokens = pgTable("verificationToken", {
36
+ identifier: text("identifier").notNull(),
37
+ token: text("token").notNull(),
38
+ expires: timestamp("expires", { mode: "date" }).notNull(),
39
+ }, (vt) => ({
40
+ compoundKey: primaryKey(vt.identifier, vt.token),
41
+ }));
42
+ return { users, accounts, sessions, verificationTokens };
43
+ }
44
+ export function pgDrizzleAdapter(client, tableFn = defaultPgTableFn) {
45
+ const { users, accounts, sessions, verificationTokens } = createTables(tableFn);
49
46
  return {
50
- createUser: async (data) => {
47
+ async createUser(data) {
51
48
  return await client
52
49
  .insert(users)
53
50
  .values({ ...data, id: crypto.randomUUID() })
54
51
  .returning()
55
52
  .then((res) => res[0] ?? null);
56
53
  },
57
- getUser: async (data) => {
54
+ async getUser(data) {
58
55
  return await client
59
56
  .select()
60
57
  .from(users)
61
58
  .where(eq(users.id, data))
62
59
  .then((res) => res[0] ?? null);
63
60
  },
64
- getUserByEmail: async (data) => {
61
+ async getUserByEmail(data) {
65
62
  return await client
66
63
  .select()
67
64
  .from(users)
68
65
  .where(eq(users.email, data))
69
66
  .then((res) => res[0] ?? null);
70
67
  },
71
- createSession: async (data) => {
68
+ async createSession(data) {
72
69
  return await client
73
70
  .insert(sessions)
74
71
  .values(data)
75
72
  .returning()
76
73
  .then((res) => res[0]);
77
74
  },
78
- getSessionAndUser: async (data) => {
75
+ async getSessionAndUser(data) {
79
76
  return await client
80
77
  .select({
81
78
  session: sessions,
@@ -86,7 +83,7 @@ export function pgDrizzleAdapter(client) {
86
83
  .innerJoin(users, eq(users.id, sessions.userId))
87
84
  .then((res) => res[0] ?? null);
88
85
  },
89
- updateUser: async (data) => {
86
+ async updateUser(data) {
90
87
  if (!data.id) {
91
88
  throw new Error("No user id.");
92
89
  }
@@ -97,7 +94,7 @@ export function pgDrizzleAdapter(client) {
97
94
  .returning()
98
95
  .then((res) => res[0]);
99
96
  },
100
- updateSession: async (data) => {
97
+ async updateSession(data) {
101
98
  return await client
102
99
  .update(sessions)
103
100
  .set(data)
@@ -105,7 +102,7 @@ export function pgDrizzleAdapter(client) {
105
102
  .returning()
106
103
  .then((res) => res[0]);
107
104
  },
108
- linkAccount: async (rawAccount) => {
105
+ async linkAccount(rawAccount) {
109
106
  const updatedAccount = await client
110
107
  .insert(accounts)
111
108
  .values(rawAccount)
@@ -125,7 +122,7 @@ export function pgDrizzleAdapter(client) {
125
122
  };
126
123
  return account;
127
124
  },
128
- getUserByAccount: async (account) => {
125
+ async getUserByAccount(account) {
129
126
  const dbAccount = (await client
130
127
  .select()
131
128
  .from(accounts)
@@ -137,7 +134,7 @@ export function pgDrizzleAdapter(client) {
137
134
  }
138
135
  return dbAccount.users;
139
136
  },
140
- deleteSession: async (sessionToken) => {
137
+ async deleteSession(sessionToken) {
141
138
  const session = await client
142
139
  .delete(sessions)
143
140
  .where(eq(sessions.sessionToken, sessionToken))
@@ -145,14 +142,14 @@ export function pgDrizzleAdapter(client) {
145
142
  .then((res) => res[0] ?? null);
146
143
  return session;
147
144
  },
148
- createVerificationToken: async (token) => {
145
+ async createVerificationToken(token) {
149
146
  return await client
150
147
  .insert(verificationTokens)
151
148
  .values(token)
152
149
  .returning()
153
150
  .then((res) => res[0]);
154
151
  },
155
- useVerificationToken: async (token) => {
152
+ async useVerificationToken(token) {
156
153
  try {
157
154
  return await client
158
155
  .delete(verificationTokens)
@@ -164,14 +161,14 @@ export function pgDrizzleAdapter(client) {
164
161
  throw new Error("No verification token found.");
165
162
  }
166
163
  },
167
- deleteUser: async (id) => {
164
+ async deleteUser(id) {
168
165
  await client
169
166
  .delete(users)
170
167
  .where(eq(users.id, id))
171
168
  .returning()
172
169
  .then((res) => res[0] ?? null);
173
170
  },
174
- unlinkAccount: async (account) => {
171
+ async unlinkAccount(account) {
175
172
  const { type, provider, providerAccountId, userId } = await client
176
173
  .delete(accounts)
177
174
  .where(and(eq(accounts.providerAccountId, account.providerAccountId), eq(accounts.provider, account.provider)))
package/lib/sqlite.d.ts CHANGED
@@ -1,2 +1,225 @@
1
- export type DefaultSchema = typeof schema;
1
+ import { BaseSQLiteDatabase, SQLiteTableFn } from "drizzle-orm/sqlite-core";
2
+ import type { Adapter } from "@auth/core/adapters";
3
+ export declare function createTables(sqliteTable: SQLiteTableFn): {
4
+ users: import("drizzle-orm/db.d-b5fdf746").ag<{
5
+ name: "users";
6
+ schema: undefined;
7
+ columns: {
8
+ id: import("drizzle-orm/sqlite-core").SQLiteText<{
9
+ tableName: "users";
10
+ enumValues: [string, ...string[]];
11
+ name: "id";
12
+ data: string;
13
+ driverParam: string;
14
+ hasDefault: false;
15
+ notNull: true;
16
+ }>;
17
+ name: import("drizzle-orm/sqlite-core").SQLiteText<{
18
+ tableName: "users";
19
+ name: "name";
20
+ data: string;
21
+ driverParam: string;
22
+ enumValues: [string, ...string[]];
23
+ notNull: false;
24
+ hasDefault: false;
25
+ }>;
26
+ email: import("drizzle-orm/sqlite-core").SQLiteText<{
27
+ tableName: "users";
28
+ enumValues: [string, ...string[]];
29
+ name: "email";
30
+ data: string;
31
+ driverParam: string;
32
+ hasDefault: false;
33
+ notNull: true;
34
+ }>;
35
+ emailVerified: import("drizzle-orm/sqlite-core").SQLiteTimestamp<{
36
+ tableName: "users";
37
+ name: "emailVerified";
38
+ data: Date;
39
+ driverParam: number;
40
+ notNull: false;
41
+ hasDefault: false;
42
+ }>;
43
+ image: import("drizzle-orm/sqlite-core").SQLiteText<{
44
+ tableName: "users";
45
+ name: "image";
46
+ data: string;
47
+ driverParam: string;
48
+ enumValues: [string, ...string[]];
49
+ notNull: false;
50
+ hasDefault: false;
51
+ }>;
52
+ };
53
+ }>;
54
+ accounts: import("drizzle-orm/db.d-b5fdf746").ag<{
55
+ name: "accounts";
56
+ schema: undefined;
57
+ columns: {
58
+ userId: import("drizzle-orm/sqlite-core").SQLiteText<{
59
+ tableName: "accounts";
60
+ enumValues: [string, ...string[]];
61
+ name: "userId";
62
+ data: string;
63
+ driverParam: string;
64
+ hasDefault: false;
65
+ notNull: true;
66
+ }>;
67
+ type: import("drizzle-orm/sqlite-core").SQLiteText<{
68
+ tableName: "accounts";
69
+ enumValues: [string, ...string[]];
70
+ name: "type";
71
+ data: "email" | "oidc" | "oauth";
72
+ driverParam: string;
73
+ hasDefault: false;
74
+ notNull: true;
75
+ }>;
76
+ provider: import("drizzle-orm/sqlite-core").SQLiteText<{
77
+ tableName: "accounts";
78
+ enumValues: [string, ...string[]];
79
+ name: "provider";
80
+ data: string;
81
+ driverParam: string;
82
+ hasDefault: false;
83
+ notNull: true;
84
+ }>;
85
+ providerAccountId: import("drizzle-orm/sqlite-core").SQLiteText<{
86
+ tableName: "accounts";
87
+ enumValues: [string, ...string[]];
88
+ name: "providerAccountId";
89
+ data: string;
90
+ driverParam: string;
91
+ hasDefault: false;
92
+ notNull: true;
93
+ }>;
94
+ refresh_token: import("drizzle-orm/sqlite-core").SQLiteText<{
95
+ tableName: "accounts";
96
+ name: "refresh_token";
97
+ data: string;
98
+ driverParam: string;
99
+ enumValues: [string, ...string[]];
100
+ notNull: false;
101
+ hasDefault: false;
102
+ }>;
103
+ access_token: import("drizzle-orm/sqlite-core").SQLiteText<{
104
+ tableName: "accounts";
105
+ name: "access_token";
106
+ data: string;
107
+ driverParam: string;
108
+ enumValues: [string, ...string[]];
109
+ notNull: false;
110
+ hasDefault: false;
111
+ }>;
112
+ expires_at: import("drizzle-orm/sqlite-core").SQLiteInteger<{
113
+ tableName: "accounts";
114
+ name: "expires_at";
115
+ data: number;
116
+ driverParam: number;
117
+ notNull: false;
118
+ hasDefault: false;
119
+ }>;
120
+ token_type: import("drizzle-orm/sqlite-core").SQLiteText<{
121
+ tableName: "accounts";
122
+ name: "token_type";
123
+ data: string;
124
+ driverParam: string;
125
+ enumValues: [string, ...string[]];
126
+ notNull: false;
127
+ hasDefault: false;
128
+ }>;
129
+ scope: import("drizzle-orm/sqlite-core").SQLiteText<{
130
+ tableName: "accounts";
131
+ name: "scope";
132
+ data: string;
133
+ driverParam: string;
134
+ enumValues: [string, ...string[]];
135
+ notNull: false;
136
+ hasDefault: false;
137
+ }>;
138
+ id_token: import("drizzle-orm/sqlite-core").SQLiteText<{
139
+ tableName: "accounts";
140
+ name: "id_token";
141
+ data: string;
142
+ driverParam: string;
143
+ enumValues: [string, ...string[]];
144
+ notNull: false;
145
+ hasDefault: false;
146
+ }>;
147
+ session_state: import("drizzle-orm/sqlite-core").SQLiteText<{
148
+ tableName: "accounts";
149
+ name: "session_state";
150
+ data: string;
151
+ driverParam: string;
152
+ enumValues: [string, ...string[]];
153
+ notNull: false;
154
+ hasDefault: false;
155
+ }>;
156
+ };
157
+ }>;
158
+ sessions: import("drizzle-orm/db.d-b5fdf746").ag<{
159
+ name: "sessions";
160
+ schema: undefined;
161
+ columns: {
162
+ sessionToken: import("drizzle-orm/sqlite-core").SQLiteText<{
163
+ tableName: "sessions";
164
+ enumValues: [string, ...string[]];
165
+ name: "sessionToken";
166
+ data: string;
167
+ driverParam: string;
168
+ hasDefault: false;
169
+ notNull: true;
170
+ }>;
171
+ userId: import("drizzle-orm/sqlite-core").SQLiteText<{
172
+ tableName: "sessions";
173
+ enumValues: [string, ...string[]];
174
+ name: "userId";
175
+ data: string;
176
+ driverParam: string;
177
+ hasDefault: false;
178
+ notNull: true;
179
+ }>;
180
+ expires: import("drizzle-orm/sqlite-core").SQLiteTimestamp<{
181
+ tableName: "sessions";
182
+ name: "expires";
183
+ data: Date;
184
+ driverParam: number;
185
+ hasDefault: false;
186
+ notNull: true;
187
+ }>;
188
+ };
189
+ }>;
190
+ verificationTokens: import("drizzle-orm/db.d-b5fdf746").ag<{
191
+ name: "verificationToken";
192
+ schema: undefined;
193
+ columns: {
194
+ identifier: import("drizzle-orm/sqlite-core").SQLiteText<{
195
+ tableName: "verificationToken";
196
+ enumValues: [string, ...string[]];
197
+ name: "identifier";
198
+ data: string;
199
+ driverParam: string;
200
+ hasDefault: false;
201
+ notNull: true;
202
+ }>;
203
+ token: import("drizzle-orm/sqlite-core").SQLiteText<{
204
+ tableName: "verificationToken";
205
+ enumValues: [string, ...string[]];
206
+ name: "token";
207
+ data: string;
208
+ driverParam: string;
209
+ hasDefault: false;
210
+ notNull: true;
211
+ }>;
212
+ expires: import("drizzle-orm/sqlite-core").SQLiteTimestamp<{
213
+ tableName: "verificationToken";
214
+ name: "expires";
215
+ data: Date;
216
+ driverParam: number;
217
+ hasDefault: false;
218
+ notNull: true;
219
+ }>;
220
+ };
221
+ }>;
222
+ };
223
+ export type DefaultSchema = ReturnType<typeof createTables>;
224
+ export declare function SQLiteDrizzleAdapter(client: BaseSQLiteDatabase<any, any>, tableFn?: SQLiteTableFn<undefined>): Adapter;
2
225
  //# sourceMappingURL=sqlite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../src/lib/sqlite.ts"],"names":[],"mappings":"AAkEA,MAAM,MAAM,aAAa,GAAG,OAAO,MAAM,CAAA"}
1
+ {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../src/lib/sqlite.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,kBAAkB,EAClB,aAAa,EACd,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,qBAAqB,CAAA;AAElE,wBAAgB,YAAY,CAAC,WAAW,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDtD;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AAE3D,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,EACpC,OAAO,2BAAuB,GAC7B,OAAO,CA2IT"}