@syncello/auth 2.5.1

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/README.md ADDED
@@ -0,0 +1,187 @@
1
+ # @syncello/auth
2
+
3
+ Authentication library for Hono + Drizzle + Cloudflare Workers.
4
+
5
+ ## Features
6
+
7
+ - Password hashing with bcrypt + HMAC-SHA256 pepper
8
+ - Session management with sliding expiration
9
+ - Two-factor authentication (TOTP + backup codes)
10
+ - Account lockout protection
11
+ - Rate limiting (KV-based)
12
+ - CSRF protection
13
+ - Email verification
14
+ - Password reset
15
+ - OAuth support (Google, Microsoft)
16
+ - Mobile PKCE support
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install @syncello/auth --registry=https://npm.pkg.github.com
22
+ ```
23
+
24
+ Configure `.npmrc`:
25
+ ```
26
+ @syncello:registry=https://npm.pkg.github.com
27
+ ```
28
+
29
+ ## Quick Start
30
+
31
+ ```typescript
32
+ import { createAuth } from '@syncello/auth';
33
+ import { users, sessions } from '@syncello/auth/schema';
34
+
35
+ const auth = createAuth({
36
+ database: db,
37
+ email: {
38
+ send: async (to, subject, html, text) => {
39
+ await resend.emails.send({ to, subject, html, text });
40
+ },
41
+ },
42
+ env: {
43
+ passwordPepper: process.env.PASSWORD_PEPPER_V1,
44
+ appUrl: process.env.APP_URL,
45
+ appName: 'My App',
46
+ },
47
+ });
48
+
49
+ // Mount routes
50
+ app.route('/v1/auth', auth.routes);
51
+
52
+ // Use middleware
53
+ app.use('/api/*', auth.middleware.requireAuth);
54
+ ```
55
+
56
+ ## Schema
57
+
58
+ Import and use the auth schema in your Drizzle config:
59
+
60
+ ```typescript
61
+ import {
62
+ users,
63
+ sessions,
64
+ user2faMethods,
65
+ userBackupCodes,
66
+ userTrustedDevices,
67
+ emailVerificationTokens,
68
+ passwordResetTokens,
69
+ oauthAccounts,
70
+ securityAuditLog,
71
+ } from '@syncello/auth/schema';
72
+
73
+ export {
74
+ users,
75
+ sessions,
76
+ // ... other tables
77
+ };
78
+ ```
79
+
80
+ ## Configuration
81
+
82
+ ```typescript
83
+ interface CreateAuthOptions {
84
+ // Database (required)
85
+ database: DrizzleDB | ((c: Context) => DrizzleDB);
86
+
87
+ // Email adapter (required)
88
+ email: {
89
+ send(to: string, subject: string, html: string, text?: string): Promise<void>;
90
+ };
91
+
92
+ // Environment configuration
93
+ env: {
94
+ passwordPepper: string;
95
+ appUrl: string;
96
+ appName?: string;
97
+ sessionTtlDays?: number;
98
+ lockoutDurationMinutes?: number;
99
+ lockoutMaxAttempts?: number;
100
+ };
101
+
102
+ // Optional custom email templates
103
+ templates?: {
104
+ verification?: EmailTemplate;
105
+ passwordReset?: EmailTemplate;
106
+ twoFactorCode?: EmailTemplate;
107
+ };
108
+
109
+ // Optional KV bindings
110
+ kv?: {
111
+ rateLimit?: KVNamespace | ((c: Context) => KVNamespace);
112
+ challenges?: KVNamespace | ((c: Context) => KVNamespace);
113
+ };
114
+
115
+ // Optional Turnstile verification
116
+ turnstile?: {
117
+ secretKey: string;
118
+ enabled?: boolean;
119
+ };
120
+ }
121
+ ```
122
+
123
+ ## Middleware
124
+
125
+ ```typescript
126
+ // Require authentication
127
+ app.use('/api/*', auth.middleware.requireAuth);
128
+
129
+ // Optional authentication (sets userId if logged in)
130
+ app.use('/api/*', auth.middleware.optionalAuth);
131
+
132
+ // Require verified email
133
+ app.use('/api/*', auth.middleware.requireVerifiedEmail);
134
+
135
+ // CSRF protection
136
+ app.use('/api/*', auth.middleware.csrf);
137
+
138
+ // Rate limiting
139
+ app.use('/api/login', auth.middleware.rateLimit({
140
+ identifier: (c) => c.req.header('cf-connecting-ip') || 'unknown',
141
+ action: 'login',
142
+ maxAttempts: 5,
143
+ windowMs: 15 * 60 * 1000, // 15 minutes
144
+ }));
145
+ ```
146
+
147
+ ## Utilities
148
+
149
+ ```typescript
150
+ // Password hashing
151
+ const hash = await auth.utils.hashPassword('password123');
152
+ const isValid = await auth.utils.verifyPassword('password123', hash);
153
+
154
+ // Password validation
155
+ const validation = auth.utils.validatePassword('password123');
156
+ if (!validation.valid) {
157
+ console.error(validation.error);
158
+ }
159
+
160
+ // Session management
161
+ const sessionId = await auth.utils.createSession(db, userId);
162
+ await auth.utils.deleteSession(db, sessionId);
163
+ ```
164
+
165
+ ## Direct Imports
166
+
167
+ For advanced usage, you can import utilities directly:
168
+
169
+ ```typescript
170
+ import {
171
+ hashPassword,
172
+ verifyPassword,
173
+ validatePassword,
174
+ validatePasswordWithBreachCheck,
175
+ createSession,
176
+ deleteSession,
177
+ generateSecureToken,
178
+ hashToken,
179
+ generateTotpSecret,
180
+ verifyTotpCode,
181
+ generateBackupCodes,
182
+ } from '@syncello/auth';
183
+ ```
184
+
185
+ ## License
186
+
187
+ UNLICENSED - Syncello Internal Use Only
@@ -0,0 +1,263 @@
1
+ // src/schema/definitions.ts
2
+ var SCHEMA_VERSION = "2026.05.1";
3
+ var enums = {
4
+ identifierType: {
5
+ name: "identifier_type_enum",
6
+ values: ["email", "ip"]
7
+ },
8
+ twoFactorMethod: {
9
+ name: "two_factor_method",
10
+ values: ["totp", "email"]
11
+ },
12
+ deviceType: {
13
+ name: "device_type",
14
+ values: ["desktop", "mobile", "tablet"]
15
+ }
16
+ };
17
+ var tables = {
18
+ users: {
19
+ columns: {
20
+ id: { type: "uuid", primaryKey: true, default: "gen_random_uuid()" },
21
+ email: { type: "varchar", length: 255, notNull: true, unique: true },
22
+ name: { type: "text" },
23
+ hashedPassword: { type: "varchar", length: 255 },
24
+ pepperKid: { type: "varchar", length: 10, default: "v1" },
25
+ emailVerified: { type: "boolean", default: false },
26
+ isAdmin: { type: "boolean", default: false, notNull: true },
27
+ sessionVersion: { type: "integer", default: 1 },
28
+ lockedUntil: { type: "bigint", mode: "number" },
29
+ failedLoginCount: { type: "integer", default: 0 },
30
+ emailBounced: { type: "boolean", default: false, notNull: true },
31
+ emailBouncedAt: { type: "timestamp", withTimezone: true },
32
+ emailComplained: { type: "boolean", default: false, notNull: true },
33
+ emailComplainedAt: { type: "timestamp", withTimezone: true },
34
+ activatedAt: { type: "timestamp", withTimezone: true },
35
+ deletedAt: { type: "timestamp", withTimezone: true },
36
+ scheduledPurgeAt: { type: "timestamp", withTimezone: true },
37
+ createdAt: { type: "timestamp", withTimezone: true, default: "now()" },
38
+ updatedAt: { type: "timestamp", withTimezone: true, default: "now()" }
39
+ },
40
+ indexes: [{ name: "idx_users_email", columns: ["email"] }]
41
+ },
42
+ sessions: {
43
+ columns: {
44
+ id: { type: "varchar", length: 128, primaryKey: true },
45
+ userId: {
46
+ type: "uuid",
47
+ notNull: true,
48
+ references: { table: "users", column: "id", onDelete: "cascade" }
49
+ },
50
+ expiresAt: { type: "bigint", mode: "number", notNull: true },
51
+ createdAt: { type: "bigint", mode: "number", notNull: true },
52
+ lastActiveAt: { type: "bigint", mode: "number" },
53
+ fingerprint: { type: "varchar", length: 64 },
54
+ ipAddress: { type: "varchar", length: 45 }
55
+ },
56
+ indexes: [
57
+ { name: "idx_sessions_expires", columns: ["expiresAt"] },
58
+ { name: "idx_sessions_user", columns: ["userId"] }
59
+ ]
60
+ },
61
+ user2faMethods: {
62
+ columns: {
63
+ id: { type: "uuid", primaryKey: true, default: "gen_random_uuid()" },
64
+ userId: {
65
+ type: "uuid",
66
+ notNull: true,
67
+ references: { table: "users", column: "id", onDelete: "cascade" }
68
+ },
69
+ method: { type: "two_factor_method", notNull: true },
70
+ totpSecret: { type: "varchar", length: 256 },
71
+ lastTotpCounter: { type: "bigint", mode: "number" },
72
+ isPrimary: { type: "boolean", default: false, notNull: true },
73
+ verifiedAt: { type: "bigint", mode: "number", notNull: true },
74
+ createdAt: { type: "bigint", mode: "number", notNull: true }
75
+ },
76
+ indexes: [
77
+ { name: "user_2fa_methods_user_method_idx", columns: ["userId", "method"], unique: true },
78
+ { name: "user_2fa_methods_user_idx", columns: ["userId"] }
79
+ ]
80
+ },
81
+ userBackupCodes: {
82
+ columns: {
83
+ id: { type: "uuid", primaryKey: true, default: "gen_random_uuid()" },
84
+ userId: {
85
+ type: "uuid",
86
+ notNull: true,
87
+ references: { table: "users", column: "id", onDelete: "cascade" }
88
+ },
89
+ codeHash: { type: "varchar", length: 255, notNull: true },
90
+ usedAt: { type: "bigint", mode: "number" },
91
+ createdAt: { type: "bigint", mode: "number", notNull: true }
92
+ },
93
+ indexes: [{ name: "user_backup_codes_user_idx", columns: ["userId"] }]
94
+ },
95
+ userTrustedDevices: {
96
+ columns: {
97
+ id: { type: "uuid", primaryKey: true, default: "gen_random_uuid()" },
98
+ userId: {
99
+ type: "uuid",
100
+ notNull: true,
101
+ references: { table: "users", column: "id", onDelete: "cascade" }
102
+ },
103
+ tokenHash: { type: "varchar", length: 128, notNull: true },
104
+ deviceName: { type: "varchar", length: 255, notNull: true },
105
+ deviceType: { type: "device_type", notNull: true, default: "desktop" },
106
+ ipAddress: { type: "varchar", length: 45, notNull: true },
107
+ expiresAt: { type: "bigint", mode: "number", notNull: true },
108
+ lastUsedAt: { type: "bigint", mode: "number", notNull: true },
109
+ createdAt: { type: "bigint", mode: "number", notNull: true }
110
+ },
111
+ indexes: [
112
+ { name: "user_trusted_devices_user_idx", columns: ["userId"] },
113
+ { name: "user_trusted_devices_token_idx", columns: ["tokenHash"] },
114
+ { name: "user_trusted_devices_expires_idx", columns: ["expiresAt"] }
115
+ ]
116
+ },
117
+ emailVerificationTokens: {
118
+ columns: {
119
+ tokenHash: { type: "varchar", length: 128, primaryKey: true },
120
+ userId: {
121
+ type: "uuid",
122
+ notNull: true,
123
+ references: { table: "users", column: "id", onDelete: "cascade" }
124
+ },
125
+ email: { type: "varchar", length: 255, notNull: true },
126
+ expiresAt: { type: "bigint", mode: "number", notNull: true },
127
+ createdAt: { type: "bigint", mode: "number", notNull: true }
128
+ },
129
+ indexes: [
130
+ { name: "idx_email_verification_user", columns: ["userId"] },
131
+ { name: "idx_email_verification_expires", columns: ["expiresAt"] }
132
+ ]
133
+ },
134
+ passwordResetTokens: {
135
+ columns: {
136
+ tokenHash: { type: "varchar", length: 128, primaryKey: true },
137
+ userId: {
138
+ type: "uuid",
139
+ notNull: true,
140
+ references: { table: "users", column: "id", onDelete: "cascade" }
141
+ },
142
+ expiresAt: { type: "bigint", mode: "number", notNull: true },
143
+ used: { type: "boolean", default: false },
144
+ createdAt: { type: "bigint", mode: "number", notNull: true }
145
+ },
146
+ indexes: [
147
+ { name: "idx_password_reset_user", columns: ["userId"] },
148
+ { name: "idx_password_reset_expires", columns: ["expiresAt"] }
149
+ ]
150
+ },
151
+ emailChangeTokens: {
152
+ columns: {
153
+ id: { type: "uuid", primaryKey: true, default: "gen_random_uuid()" },
154
+ userId: {
155
+ type: "uuid",
156
+ notNull: true,
157
+ references: { table: "users", column: "id", onDelete: "cascade" }
158
+ },
159
+ newEmail: { type: "varchar", length: 255, notNull: true },
160
+ tokenHash: { type: "varchar", length: 128, notNull: true },
161
+ cancelTokenHash: { type: "varchar", length: 128, notNull: true },
162
+ expiresAt: { type: "bigint", mode: "number", notNull: true },
163
+ createdAt: { type: "bigint", mode: "number", notNull: true }
164
+ },
165
+ indexes: [
166
+ { name: "idx_email_change_tokens_user", columns: ["userId"], unique: true },
167
+ { name: "idx_email_change_tokens_token", columns: ["tokenHash"] },
168
+ { name: "idx_email_change_tokens_cancel", columns: ["cancelTokenHash"] },
169
+ { name: "idx_email_change_tokens_expires", columns: ["expiresAt"] }
170
+ ]
171
+ },
172
+ emailEvents: {
173
+ columns: {
174
+ id: { type: "uuid", primaryKey: true, default: "gen_random_uuid()" },
175
+ emailId: { type: "text", notNull: true },
176
+ userId: {
177
+ type: "uuid",
178
+ references: { table: "users", column: "id", onDelete: "cascade" }
179
+ },
180
+ eventType: { type: "text", notNull: true },
181
+ emailAddress: { type: "text", notNull: true },
182
+ metadata: { type: "json" },
183
+ createdAt: { type: "timestamp", withTimezone: true, default: "now()", notNull: true }
184
+ },
185
+ indexes: [
186
+ { name: "email_events_email_address_idx", columns: ["emailAddress"] },
187
+ { name: "email_events_user_id_idx", columns: ["userId"] },
188
+ { name: "email_events_email_id_event_type_idx", columns: ["emailId", "eventType"], unique: true }
189
+ ]
190
+ },
191
+ failedLoginAttempts: {
192
+ columns: {
193
+ id: { type: "serial", primaryKey: true },
194
+ identifier: { type: "varchar", length: 255, notNull: true },
195
+ identifierType: { type: "identifier_type_enum", notNull: true },
196
+ attemptedAt: { type: "bigint", mode: "number", notNull: true }
197
+ },
198
+ indexes: [
199
+ { name: "idx_failed_attempts_identifier", columns: ["identifier", "attemptedAt"] },
200
+ { name: "idx_failed_attempts_time", columns: ["attemptedAt"] }
201
+ ]
202
+ },
203
+ securityAuditLog: {
204
+ columns: {
205
+ id: { type: "serial", primaryKey: true },
206
+ userId: {
207
+ type: "uuid",
208
+ references: { table: "users", column: "id", onDelete: "set null" }
209
+ },
210
+ eventType: { type: "varchar", length: 50, notNull: true },
211
+ eventData: { type: "json" },
212
+ ipAddress: { type: "varchar", length: 45 },
213
+ userAgent: { type: "text" },
214
+ success: { type: "boolean", notNull: true },
215
+ createdAt: { type: "timestamp", withTimezone: true, default: "now()" }
216
+ },
217
+ indexes: [
218
+ { name: "idx_audit_user", columns: ["userId"] },
219
+ { name: "idx_audit_event", columns: ["eventType"] },
220
+ { name: "idx_audit_created", columns: ["createdAt"] }
221
+ ]
222
+ },
223
+ oauthAccounts: {
224
+ columns: {
225
+ id: { type: "uuid", primaryKey: true, default: "gen_random_uuid()" },
226
+ userId: {
227
+ type: "uuid",
228
+ notNull: true,
229
+ references: { table: "users", column: "id", onDelete: "cascade" }
230
+ },
231
+ provider: { type: "varchar", length: 50, notNull: true },
232
+ providerUserId: { type: "varchar", length: 255, notNull: true },
233
+ email: { type: "varchar", length: 255, notNull: true },
234
+ createdAt: { type: "timestamp", withTimezone: true, default: "now()", notNull: true }
235
+ },
236
+ indexes: [
237
+ { name: "oauth_accounts_user_provider_idx", columns: ["userId", "provider"], unique: true },
238
+ { name: "oauth_accounts_provider_user_idx", columns: ["provider", "providerUserId"], unique: true }
239
+ ]
240
+ }
241
+ };
242
+ var tableNames = {
243
+ users: "users",
244
+ sessions: "sessions",
245
+ user2faMethods: "user_2fa_methods",
246
+ userBackupCodes: "user_backup_codes",
247
+ userTrustedDevices: "user_trusted_devices",
248
+ emailVerificationTokens: "email_verification_tokens",
249
+ passwordResetTokens: "password_reset_tokens",
250
+ emailChangeTokens: "email_change_tokens",
251
+ emailEvents: "email_events",
252
+ failedLoginAttempts: "failed_login_attempts",
253
+ securityAuditLog: "security_audit_log",
254
+ oauthAccounts: "oauth_accounts"
255
+ };
256
+
257
+ export {
258
+ SCHEMA_VERSION,
259
+ enums,
260
+ tables,
261
+ tableNames
262
+ };
263
+ //# sourceMappingURL=chunk-OZ26T3ZA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schema/definitions.ts"],"sourcesContent":["/**\n * @syncello/auth Schema Definitions\n * Plain TypeScript objects for CLI-based Drizzle code generation\n */\n\nexport const SCHEMA_VERSION = '2026.05.1';\n\n// ====================================\n// TYPE DEFINITIONS\n// ====================================\n\nexport type ColumnType =\n\t| 'uuid'\n\t| 'varchar'\n\t| 'text'\n\t| 'boolean'\n\t| 'integer'\n\t| 'bigint'\n\t| 'timestamp'\n\t| 'json'\n\t| 'serial';\n\nexport type ColumnDefinition = {\n\ttype: ColumnType | string; // string allows enum references\n\tlength?: number;\n\tprimaryKey?: boolean;\n\tnotNull?: boolean;\n\tunique?: boolean;\n\tdefault?: string | number | boolean | null;\n\treferences?: {\n\t\ttable: string;\n\t\tcolumn: string;\n\t\tonDelete?: 'cascade' | 'set null' | 'restrict' | 'no action';\n\t};\n\tmode?: 'number'; // for bigint\n\twithTimezone?: boolean; // for timestamp\n};\n\nexport type IndexDefinition = {\n\tname: string;\n\tcolumns: string[];\n\tunique?: boolean;\n};\n\nexport type TableDefinition = {\n\tcolumns: Record<string, ColumnDefinition>;\n\tindexes?: IndexDefinition[];\n};\n\nexport type EnumDefinition = {\n\tname: string;\n\tvalues: readonly string[];\n};\n\n// ====================================\n// ENUMS\n// ====================================\n\nexport const enums = {\n\tidentifierType: {\n\t\tname: 'identifier_type_enum',\n\t\tvalues: ['email', 'ip'] as const,\n\t},\n\ttwoFactorMethod: {\n\t\tname: 'two_factor_method',\n\t\tvalues: ['totp', 'email'] as const,\n\t},\n\tdeviceType: {\n\t\tname: 'device_type',\n\t\tvalues: ['desktop', 'mobile', 'tablet'] as const,\n\t},\n} as const satisfies Record<string, EnumDefinition>;\n\n// ====================================\n// TABLE DEFINITIONS\n// ====================================\n\nexport const tables = {\n\tusers: {\n\t\tcolumns: {\n\t\t\tid: { type: 'uuid', primaryKey: true, default: 'gen_random_uuid()' },\n\t\t\temail: { type: 'varchar', length: 255, notNull: true, unique: true },\n\t\t\tname: { type: 'text' },\n\t\t\thashedPassword: { type: 'varchar', length: 255 },\n\t\t\tpepperKid: { type: 'varchar', length: 10, default: 'v1' },\n\t\t\temailVerified: { type: 'boolean', default: false },\n\t\t\tisAdmin: { type: 'boolean', default: false, notNull: true },\n\t\t\tsessionVersion: { type: 'integer', default: 1 },\n\t\t\tlockedUntil: { type: 'bigint', mode: 'number' },\n\t\t\tfailedLoginCount: { type: 'integer', default: 0 },\n\t\t\temailBounced: { type: 'boolean', default: false, notNull: true },\n\t\t\temailBouncedAt: { type: 'timestamp', withTimezone: true },\n\t\t\temailComplained: { type: 'boolean', default: false, notNull: true },\n\t\t\temailComplainedAt: { type: 'timestamp', withTimezone: true },\n\t\t\tactivatedAt: { type: 'timestamp', withTimezone: true },\n\t\t\tdeletedAt: { type: 'timestamp', withTimezone: true },\n\t\t\tscheduledPurgeAt: { type: 'timestamp', withTimezone: true },\n\t\t\tcreatedAt: { type: 'timestamp', withTimezone: true, default: 'now()' },\n\t\t\tupdatedAt: { type: 'timestamp', withTimezone: true, default: 'now()' },\n\t\t},\n\t\tindexes: [{ name: 'idx_users_email', columns: ['email'] }],\n\t},\n\n\tsessions: {\n\t\tcolumns: {\n\t\t\tid: { type: 'varchar', length: 128, primaryKey: true },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\tnotNull: true,\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\texpiresAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t\tcreatedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t\tlastActiveAt: { type: 'bigint', mode: 'number' },\n\t\t\tfingerprint: { type: 'varchar', length: 64 },\n\t\t\tipAddress: { type: 'varchar', length: 45 },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'idx_sessions_expires', columns: ['expiresAt'] },\n\t\t\t{ name: 'idx_sessions_user', columns: ['userId'] },\n\t\t],\n\t},\n\n\tuser2faMethods: {\n\t\tcolumns: {\n\t\t\tid: { type: 'uuid', primaryKey: true, default: 'gen_random_uuid()' },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\tnotNull: true,\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\tmethod: { type: 'two_factor_method', notNull: true },\n\t\t\ttotpSecret: { type: 'varchar', length: 256 },\n\t\t\tlastTotpCounter: { type: 'bigint', mode: 'number' },\n\t\t\tisPrimary: { type: 'boolean', default: false, notNull: true },\n\t\t\tverifiedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t\tcreatedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'user_2fa_methods_user_method_idx', columns: ['userId', 'method'], unique: true },\n\t\t\t{ name: 'user_2fa_methods_user_idx', columns: ['userId'] },\n\t\t],\n\t},\n\n\tuserBackupCodes: {\n\t\tcolumns: {\n\t\t\tid: { type: 'uuid', primaryKey: true, default: 'gen_random_uuid()' },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\tnotNull: true,\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\tcodeHash: { type: 'varchar', length: 255, notNull: true },\n\t\t\tusedAt: { type: 'bigint', mode: 'number' },\n\t\t\tcreatedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t},\n\t\tindexes: [{ name: 'user_backup_codes_user_idx', columns: ['userId'] }],\n\t},\n\n\tuserTrustedDevices: {\n\t\tcolumns: {\n\t\t\tid: { type: 'uuid', primaryKey: true, default: 'gen_random_uuid()' },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\tnotNull: true,\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\ttokenHash: { type: 'varchar', length: 128, notNull: true },\n\t\t\tdeviceName: { type: 'varchar', length: 255, notNull: true },\n\t\t\tdeviceType: { type: 'device_type', notNull: true, default: 'desktop' },\n\t\t\tipAddress: { type: 'varchar', length: 45, notNull: true },\n\t\t\texpiresAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t\tlastUsedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t\tcreatedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'user_trusted_devices_user_idx', columns: ['userId'] },\n\t\t\t{ name: 'user_trusted_devices_token_idx', columns: ['tokenHash'] },\n\t\t\t{ name: 'user_trusted_devices_expires_idx', columns: ['expiresAt'] },\n\t\t],\n\t},\n\n\temailVerificationTokens: {\n\t\tcolumns: {\n\t\t\ttokenHash: { type: 'varchar', length: 128, primaryKey: true },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\tnotNull: true,\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\temail: { type: 'varchar', length: 255, notNull: true },\n\t\t\texpiresAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t\tcreatedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'idx_email_verification_user', columns: ['userId'] },\n\t\t\t{ name: 'idx_email_verification_expires', columns: ['expiresAt'] },\n\t\t],\n\t},\n\n\tpasswordResetTokens: {\n\t\tcolumns: {\n\t\t\ttokenHash: { type: 'varchar', length: 128, primaryKey: true },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\tnotNull: true,\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\texpiresAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t\tused: { type: 'boolean', default: false },\n\t\t\tcreatedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'idx_password_reset_user', columns: ['userId'] },\n\t\t\t{ name: 'idx_password_reset_expires', columns: ['expiresAt'] },\n\t\t],\n\t},\n\n\temailChangeTokens: {\n\t\tcolumns: {\n\t\t\tid: { type: 'uuid', primaryKey: true, default: 'gen_random_uuid()' },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\tnotNull: true,\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\tnewEmail: { type: 'varchar', length: 255, notNull: true },\n\t\t\ttokenHash: { type: 'varchar', length: 128, notNull: true },\n\t\t\tcancelTokenHash: { type: 'varchar', length: 128, notNull: true },\n\t\t\texpiresAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t\tcreatedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'idx_email_change_tokens_user', columns: ['userId'], unique: true },\n\t\t\t{ name: 'idx_email_change_tokens_token', columns: ['tokenHash'] },\n\t\t\t{ name: 'idx_email_change_tokens_cancel', columns: ['cancelTokenHash'] },\n\t\t\t{ name: 'idx_email_change_tokens_expires', columns: ['expiresAt'] },\n\t\t],\n\t},\n\n\temailEvents: {\n\t\tcolumns: {\n\t\t\tid: { type: 'uuid', primaryKey: true, default: 'gen_random_uuid()' },\n\t\t\temailId: { type: 'text', notNull: true },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\teventType: { type: 'text', notNull: true },\n\t\t\temailAddress: { type: 'text', notNull: true },\n\t\t\tmetadata: { type: 'json' },\n\t\t\tcreatedAt: { type: 'timestamp', withTimezone: true, default: 'now()', notNull: true },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'email_events_email_address_idx', columns: ['emailAddress'] },\n\t\t\t{ name: 'email_events_user_id_idx', columns: ['userId'] },\n\t\t\t{ name: 'email_events_email_id_event_type_idx', columns: ['emailId', 'eventType'], unique: true },\n\t\t],\n\t},\n\n\tfailedLoginAttempts: {\n\t\tcolumns: {\n\t\t\tid: { type: 'serial', primaryKey: true },\n\t\t\tidentifier: { type: 'varchar', length: 255, notNull: true },\n\t\t\tidentifierType: { type: 'identifier_type_enum', notNull: true },\n\t\t\tattemptedAt: { type: 'bigint', mode: 'number', notNull: true },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'idx_failed_attempts_identifier', columns: ['identifier', 'attemptedAt'] },\n\t\t\t{ name: 'idx_failed_attempts_time', columns: ['attemptedAt'] },\n\t\t],\n\t},\n\n\tsecurityAuditLog: {\n\t\tcolumns: {\n\t\t\tid: { type: 'serial', primaryKey: true },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'set null' },\n\t\t\t},\n\t\t\teventType: { type: 'varchar', length: 50, notNull: true },\n\t\t\teventData: { type: 'json' },\n\t\t\tipAddress: { type: 'varchar', length: 45 },\n\t\t\tuserAgent: { type: 'text' },\n\t\t\tsuccess: { type: 'boolean', notNull: true },\n\t\t\tcreatedAt: { type: 'timestamp', withTimezone: true, default: 'now()' },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'idx_audit_user', columns: ['userId'] },\n\t\t\t{ name: 'idx_audit_event', columns: ['eventType'] },\n\t\t\t{ name: 'idx_audit_created', columns: ['createdAt'] },\n\t\t],\n\t},\n\n\toauthAccounts: {\n\t\tcolumns: {\n\t\t\tid: { type: 'uuid', primaryKey: true, default: 'gen_random_uuid()' },\n\t\t\tuserId: {\n\t\t\t\ttype: 'uuid',\n\t\t\t\tnotNull: true,\n\t\t\t\treferences: { table: 'users', column: 'id', onDelete: 'cascade' },\n\t\t\t},\n\t\t\tprovider: { type: 'varchar', length: 50, notNull: true },\n\t\t\tproviderUserId: { type: 'varchar', length: 255, notNull: true },\n\t\t\temail: { type: 'varchar', length: 255, notNull: true },\n\t\t\tcreatedAt: { type: 'timestamp', withTimezone: true, default: 'now()', notNull: true },\n\t\t},\n\t\tindexes: [\n\t\t\t{ name: 'oauth_accounts_user_provider_idx', columns: ['userId', 'provider'], unique: true },\n\t\t\t{ name: 'oauth_accounts_provider_user_idx', columns: ['provider', 'providerUserId'], unique: true },\n\t\t],\n\t},\n} as const satisfies Record<string, TableDefinition>;\n\n// ====================================\n// TABLE NAME MAPPING\n// ====================================\n\nexport const tableNames = {\n\tusers: 'users',\n\tsessions: 'sessions',\n\tuser2faMethods: 'user_2fa_methods',\n\tuserBackupCodes: 'user_backup_codes',\n\tuserTrustedDevices: 'user_trusted_devices',\n\temailVerificationTokens: 'email_verification_tokens',\n\tpasswordResetTokens: 'password_reset_tokens',\n\temailChangeTokens: 'email_change_tokens',\n\temailEvents: 'email_events',\n\tfailedLoginAttempts: 'failed_login_attempts',\n\tsecurityAuditLog: 'security_audit_log',\n\toauthAccounts: 'oauth_accounts',\n} as const;\n\nexport type TableName = keyof typeof tables;\nexport type EnumName = keyof typeof enums;\n"],"mappings":";AAKO,IAAM,iBAAiB;AAqDvB,IAAM,QAAQ;AAAA,EACpB,gBAAgB;AAAA,IACf,MAAM;AAAA,IACN,QAAQ,CAAC,SAAS,IAAI;AAAA,EACvB;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,QAAQ,CAAC,QAAQ,OAAO;AAAA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