@banata-auth/convex 0.1.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.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +104 -0
  3. package/dist/auth-config.d.ts +22 -0
  4. package/dist/auth-config.d.ts.map +1 -0
  5. package/dist/auth-config.js +3 -0
  6. package/dist/auth-config.js.map +1 -0
  7. package/dist/auth.d.ts +462 -0
  8. package/dist/auth.d.ts.map +1 -0
  9. package/dist/component/adapter.d.ts +21 -0
  10. package/dist/component/adapter.d.ts.map +1 -0
  11. package/dist/component/adapter.js +3 -0
  12. package/dist/component/adapter.js.map +1 -0
  13. package/dist/component/schema.d.ts +1026 -0
  14. package/dist/component/schema.d.ts.map +1 -0
  15. package/dist/hooks.d.ts +25 -0
  16. package/dist/hooks.d.ts.map +1 -0
  17. package/dist/http.d.ts +41 -0
  18. package/dist/http.d.ts.map +1 -0
  19. package/dist/http.js +62 -0
  20. package/dist/http.js.map +1 -0
  21. package/dist/index.d.ts +9 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +9516 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/node.d.ts +389 -0
  26. package/dist/node.d.ts.map +1 -0
  27. package/dist/node.js +9559 -0
  28. package/dist/node.js.map +1 -0
  29. package/dist/plugins/audit.d.ts +106 -0
  30. package/dist/plugins/audit.d.ts.map +1 -0
  31. package/dist/plugins/config.d.ts +83 -0
  32. package/dist/plugins/config.d.ts.map +1 -0
  33. package/dist/plugins/domains.d.ts +3 -0
  34. package/dist/plugins/domains.d.ts.map +1 -0
  35. package/dist/plugins/email-sender.d.ts +75 -0
  36. package/dist/plugins/email-sender.d.ts.map +1 -0
  37. package/dist/plugins/email-templates.d.ts +108 -0
  38. package/dist/plugins/email-templates.d.ts.map +1 -0
  39. package/dist/plugins/email.d.ts +82 -0
  40. package/dist/plugins/email.d.ts.map +1 -0
  41. package/dist/plugins/enterprise.d.ts +3 -0
  42. package/dist/plugins/enterprise.d.ts.map +1 -0
  43. package/dist/plugins/events.d.ts +40 -0
  44. package/dist/plugins/events.d.ts.map +1 -0
  45. package/dist/plugins/index.d.ts +18 -0
  46. package/dist/plugins/index.d.ts.map +1 -0
  47. package/dist/plugins/index.js +9192 -0
  48. package/dist/plugins/index.js.map +1 -0
  49. package/dist/plugins/organization-rbac.d.ts +3 -0
  50. package/dist/plugins/organization-rbac.d.ts.map +1 -0
  51. package/dist/plugins/portal.d.ts +34 -0
  52. package/dist/plugins/portal.d.ts.map +1 -0
  53. package/dist/plugins/projects.d.ts +16 -0
  54. package/dist/plugins/projects.d.ts.map +1 -0
  55. package/dist/plugins/protection.d.ts +127 -0
  56. package/dist/plugins/protection.d.ts.map +1 -0
  57. package/dist/plugins/types.d.ts +508 -0
  58. package/dist/plugins/types.d.ts.map +1 -0
  59. package/dist/plugins/user-management.d.ts +8 -0
  60. package/dist/plugins/user-management.d.ts.map +1 -0
  61. package/dist/plugins/vault.d.ts +68 -0
  62. package/dist/plugins/vault.d.ts.map +1 -0
  63. package/dist/plugins/webhook.d.ts +65 -0
  64. package/dist/plugins/webhook.d.ts.map +1 -0
  65. package/dist/triggers.d.ts +158 -0
  66. package/dist/triggers.d.ts.map +1 -0
  67. package/dist/triggers.js +36 -0
  68. package/dist/triggers.js.map +1 -0
  69. package/package.json +102 -0
  70. package/src/component/adapter.ts +21 -0
  71. package/src/component/convex.config.ts +15 -0
  72. package/src/component/schema.ts +916 -0
@@ -0,0 +1,1026 @@
1
+ declare const schema: import("convex/server").SchemaDefinition<{
2
+ /**
3
+ * Project table — top-level organizational unit.
4
+ * Each project is a fully isolated auth tenant with its own users,
5
+ * sessions, orgs, branding, templates, webhooks, API keys, etc.
6
+ *
7
+ * Example: A software firm uses Banata Auth to power auth for
8
+ * multiple client products — each product is a project.
9
+ */
10
+ project: import("convex/server").TableDefinition<import("convex/values").VObject<{
11
+ description?: string | undefined;
12
+ logoUrl?: string | undefined;
13
+ name: string;
14
+ createdAt: number;
15
+ updatedAt: number;
16
+ slug: string;
17
+ ownerId: string;
18
+ }, {
19
+ name: import("convex/values").VString<string, "required">;
20
+ slug: import("convex/values").VString<string, "required">;
21
+ description: import("convex/values").VString<string | undefined, "optional">;
22
+ logoUrl: import("convex/values").VString<string | undefined, "optional">;
23
+ /** The dashboard user who created this project. */
24
+ ownerId: import("convex/values").VString<string, "required">;
25
+ createdAt: import("convex/values").VFloat64<number, "required">;
26
+ updatedAt: import("convex/values").VFloat64<number, "required">;
27
+ }, "required", "name" | "createdAt" | "updatedAt" | "slug" | "description" | "logoUrl" | "ownerId">, {
28
+ slug: ["slug", "_creationTime"];
29
+ ownerId: ["ownerId", "_creationTime"];
30
+ createdAt: ["createdAt", "_creationTime"];
31
+ }, {}, {}>;
32
+ /**
33
+ * User table - stores all user accounts.
34
+ * Extended with username, phone, admin, and 2FA fields.
35
+ * Scoped per project — each project has its own isolated user base.
36
+ */
37
+ user: import("convex/server").TableDefinition<import("convex/values").VObject<{
38
+ image?: string | undefined;
39
+ username?: string | undefined;
40
+ role?: string | undefined;
41
+ banned?: boolean | undefined;
42
+ twoFactorEnabled?: boolean | undefined;
43
+ isAnonymous?: boolean | undefined;
44
+ metadata?: any;
45
+ projectId?: string | undefined;
46
+ phoneNumber?: string | undefined;
47
+ phoneNumberVerified?: boolean | undefined;
48
+ banReason?: string | undefined;
49
+ banExpires?: number | undefined;
50
+ displayUsername?: string | undefined;
51
+ name: string;
52
+ email: string;
53
+ emailVerified: boolean;
54
+ createdAt: number;
55
+ updatedAt: number;
56
+ }, {
57
+ name: import("convex/values").VString<string, "required">;
58
+ email: import("convex/values").VString<string, "required">;
59
+ emailVerified: import("convex/values").VBoolean<boolean, "required">;
60
+ image: import("convex/values").VString<string | undefined, "optional">;
61
+ projectId: import("convex/values").VString<string | undefined, "optional">;
62
+ username: import("convex/values").VString<string | undefined, "optional">;
63
+ displayUsername: import("convex/values").VString<string | undefined, "optional">;
64
+ phoneNumber: import("convex/values").VString<string | undefined, "optional">;
65
+ phoneNumberVerified: import("convex/values").VBoolean<boolean | undefined, "optional">;
66
+ role: import("convex/values").VString<string | undefined, "optional">;
67
+ banned: import("convex/values").VBoolean<boolean | undefined, "optional">;
68
+ banReason: import("convex/values").VString<string | undefined, "optional">;
69
+ banExpires: import("convex/values").VFloat64<number | undefined, "optional">;
70
+ twoFactorEnabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
71
+ isAnonymous: import("convex/values").VBoolean<boolean | undefined, "optional">;
72
+ metadata: import("convex/values").VAny<any, "optional", string>;
73
+ createdAt: import("convex/values").VFloat64<number, "required">;
74
+ updatedAt: import("convex/values").VFloat64<number, "required">;
75
+ }, "required", "name" | "email" | "emailVerified" | "image" | "username" | "role" | "banned" | "twoFactorEnabled" | "isAnonymous" | "metadata" | "createdAt" | "updatedAt" | "projectId" | "phoneNumber" | "phoneNumberVerified" | "banReason" | "banExpires" | "displayUsername" | `metadata.${string}`>, {
76
+ email: ["email", "_creationTime"];
77
+ username: ["username", "_creationTime"];
78
+ phoneNumber: ["phoneNumber", "_creationTime"];
79
+ role: ["role", "_creationTime"];
80
+ createdAt: ["createdAt", "_creationTime"];
81
+ projectId: ["projectId", "_creationTime"];
82
+ projectId_email: ["projectId", "email", "_creationTime"];
83
+ }, {}, {}>;
84
+ /**
85
+ * Session table - stores active user sessions.
86
+ * Better Auth manages session lifecycle (create, refresh, revoke).
87
+ */
88
+ session: import("convex/server").TableDefinition<import("convex/values").VObject<{
89
+ ipAddress?: string | undefined;
90
+ userAgent?: string | undefined;
91
+ activeOrganizationId?: string | undefined;
92
+ impersonatedBy?: string | undefined;
93
+ projectId?: string | undefined;
94
+ createdAt: number;
95
+ updatedAt: number;
96
+ userId: string;
97
+ expiresAt: number;
98
+ token: string;
99
+ }, {
100
+ userId: import("convex/values").VString<string, "required">;
101
+ token: import("convex/values").VString<string, "required">;
102
+ expiresAt: import("convex/values").VFloat64<number, "required">;
103
+ projectId: import("convex/values").VString<string | undefined, "optional">;
104
+ ipAddress: import("convex/values").VString<string | undefined, "optional">;
105
+ userAgent: import("convex/values").VString<string | undefined, "optional">;
106
+ activeOrganizationId: import("convex/values").VString<string | undefined, "optional">;
107
+ impersonatedBy: import("convex/values").VString<string | undefined, "optional">;
108
+ createdAt: import("convex/values").VFloat64<number, "required">;
109
+ updatedAt: import("convex/values").VFloat64<number, "required">;
110
+ }, "required", "createdAt" | "updatedAt" | "userId" | "expiresAt" | "ipAddress" | "userAgent" | "activeOrganizationId" | "impersonatedBy" | "token" | "projectId">, {
111
+ token: ["token", "_creationTime"];
112
+ userId: ["userId", "_creationTime"];
113
+ projectId: ["projectId", "_creationTime"];
114
+ }, {}, {}>;
115
+ /**
116
+ * Account table - stores provider credentials (OAuth, email/password, SAML, etc.)
117
+ * Each user can have multiple accounts (one per provider).
118
+ */
119
+ account: import("convex/server").TableDefinition<import("convex/values").VObject<{
120
+ projectId?: string | undefined;
121
+ password?: string | undefined;
122
+ accessToken?: string | undefined;
123
+ refreshToken?: string | undefined;
124
+ idToken?: string | undefined;
125
+ scope?: string | undefined;
126
+ accessTokenExpiresAt?: number | undefined;
127
+ refreshTokenExpiresAt?: number | undefined;
128
+ createdAt: number;
129
+ updatedAt: number;
130
+ userId: string;
131
+ providerId: string;
132
+ accountId: string;
133
+ }, {
134
+ userId: import("convex/values").VString<string, "required">;
135
+ accountId: import("convex/values").VString<string, "required">;
136
+ providerId: import("convex/values").VString<string, "required">;
137
+ projectId: import("convex/values").VString<string | undefined, "optional">;
138
+ accessToken: import("convex/values").VString<string | undefined, "optional">;
139
+ refreshToken: import("convex/values").VString<string | undefined, "optional">;
140
+ accessTokenExpiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
141
+ refreshTokenExpiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
142
+ scope: import("convex/values").VString<string | undefined, "optional">;
143
+ idToken: import("convex/values").VString<string | undefined, "optional">;
144
+ password: import("convex/values").VString<string | undefined, "optional">;
145
+ createdAt: import("convex/values").VFloat64<number, "required">;
146
+ updatedAt: import("convex/values").VFloat64<number, "required">;
147
+ }, "required", "createdAt" | "updatedAt" | "userId" | "projectId" | "password" | "providerId" | "accountId" | "accessToken" | "refreshToken" | "idToken" | "scope" | "accessTokenExpiresAt" | "refreshTokenExpiresAt">, {
148
+ userId: ["userId", "_creationTime"];
149
+ accountId_providerId: ["accountId", "providerId", "_creationTime"];
150
+ projectId: ["projectId", "_creationTime"];
151
+ }, {}, {}>;
152
+ /**
153
+ * Verification table - stores email verification tokens, password reset tokens,
154
+ * magic link tokens, and OTPs.
155
+ */
156
+ verification: import("convex/server").TableDefinition<import("convex/values").VObject<{
157
+ createdAt?: number | undefined;
158
+ updatedAt?: number | undefined;
159
+ projectId?: string | undefined;
160
+ expiresAt: number;
161
+ value: string;
162
+ identifier: string;
163
+ }, {
164
+ identifier: import("convex/values").VString<string, "required">;
165
+ value: import("convex/values").VString<string, "required">;
166
+ expiresAt: import("convex/values").VFloat64<number, "required">;
167
+ projectId: import("convex/values").VString<string | undefined, "optional">;
168
+ createdAt: import("convex/values").VFloat64<number | undefined, "optional">;
169
+ updatedAt: import("convex/values").VFloat64<number | undefined, "optional">;
170
+ }, "required", "createdAt" | "updatedAt" | "expiresAt" | "value" | "projectId" | "identifier">, {
171
+ identifier: ["identifier", "_creationTime"];
172
+ projectId: ["projectId", "_creationTime"];
173
+ }, {}, {}>;
174
+ /**
175
+ * Two-factor authentication table.
176
+ * Stores TOTP secrets and backup codes per user.
177
+ */
178
+ twoFactor: import("convex/server").TableDefinition<import("convex/values").VObject<{
179
+ projectId?: string | undefined;
180
+ createdAt: number;
181
+ updatedAt: number;
182
+ userId: string;
183
+ secret: string;
184
+ backupCodes: string;
185
+ }, {
186
+ userId: import("convex/values").VString<string, "required">;
187
+ secret: import("convex/values").VString<string, "required">;
188
+ backupCodes: import("convex/values").VString<string, "required">;
189
+ projectId: import("convex/values").VString<string | undefined, "optional">;
190
+ createdAt: import("convex/values").VFloat64<number, "required">;
191
+ updatedAt: import("convex/values").VFloat64<number, "required">;
192
+ }, "required", "createdAt" | "updatedAt" | "userId" | "secret" | "projectId" | "backupCodes">, {
193
+ userId: ["userId", "_creationTime"];
194
+ projectId: ["projectId", "_creationTime"];
195
+ }, {}, {}>;
196
+ /**
197
+ * Passkey (WebAuthn) credentials.
198
+ * Stores registered passkeys for passwordless authentication.
199
+ */
200
+ passkey: import("convex/server").TableDefinition<import("convex/values").VObject<{
201
+ name?: string | undefined;
202
+ projectId?: string | undefined;
203
+ deviceType?: string | undefined;
204
+ backedUp?: boolean | undefined;
205
+ transports?: string | undefined;
206
+ createdAt: number;
207
+ userId: string;
208
+ publicKey: string;
209
+ credentialID: string;
210
+ counter: number;
211
+ }, {
212
+ userId: import("convex/values").VString<string, "required">;
213
+ name: import("convex/values").VString<string | undefined, "optional">;
214
+ projectId: import("convex/values").VString<string | undefined, "optional">;
215
+ credentialID: import("convex/values").VString<string, "required">;
216
+ publicKey: import("convex/values").VString<string, "required">;
217
+ counter: import("convex/values").VFloat64<number, "required">;
218
+ transports: import("convex/values").VString<string | undefined, "optional">;
219
+ deviceType: import("convex/values").VString<string | undefined, "optional">;
220
+ backedUp: import("convex/values").VBoolean<boolean | undefined, "optional">;
221
+ createdAt: import("convex/values").VFloat64<number, "required">;
222
+ }, "required", "name" | "createdAt" | "userId" | "projectId" | "publicKey" | "credentialID" | "counter" | "deviceType" | "backedUp" | "transports">, {
223
+ credentialID: ["credentialID", "_creationTime"];
224
+ userId: ["userId", "_creationTime"];
225
+ projectId: ["projectId", "_creationTime"];
226
+ }, {}, {}>;
227
+ /**
228
+ * JWKS table - stores RS256 key pairs for JWT signing.
229
+ * Better Auth generates and rotates these automatically.
230
+ * Scoped per project — each project has its own signing keys.
231
+ */
232
+ jwks: import("convex/server").TableDefinition<import("convex/values").VObject<{
233
+ projectId?: string | undefined;
234
+ createdAt: number;
235
+ publicKey: string;
236
+ privateKey: string;
237
+ }, {
238
+ publicKey: import("convex/values").VString<string, "required">;
239
+ privateKey: import("convex/values").VString<string, "required">;
240
+ projectId: import("convex/values").VString<string | undefined, "optional">;
241
+ createdAt: import("convex/values").VFloat64<number, "required">;
242
+ }, "required", "createdAt" | "projectId" | "publicKey" | "privateKey">, {
243
+ projectId: ["projectId", "_creationTime"];
244
+ }, {}, {}>;
245
+ /**
246
+ * Rate limiting table.
247
+ * Tracks request counts per key (IP + endpoint hash).
248
+ */
249
+ rateLimit: import("convex/server").TableDefinition<import("convex/values").VObject<{
250
+ projectId?: string | undefined;
251
+ count: number;
252
+ key: string;
253
+ lastRequest: number;
254
+ }, {
255
+ key: import("convex/values").VString<string, "required">;
256
+ count: import("convex/values").VFloat64<number, "required">;
257
+ lastRequest: import("convex/values").VFloat64<number, "required">;
258
+ projectId: import("convex/values").VString<string | undefined, "optional">;
259
+ }, "required", "projectId" | "count" | "key" | "lastRequest">, {
260
+ key: ["key", "_creationTime"];
261
+ projectId: ["projectId", "_creationTime"];
262
+ }, {}, {}>;
263
+ /**
264
+ * Organization table.
265
+ * Stores organization details and policies.
266
+ * Scoped per project — each project has its own orgs.
267
+ */
268
+ organization: import("convex/server").TableDefinition<import("convex/values").VObject<{
269
+ metadata?: any;
270
+ logo?: string | undefined;
271
+ projectId?: string | undefined;
272
+ name: string;
273
+ createdAt: number;
274
+ updatedAt: number;
275
+ slug: string;
276
+ }, {
277
+ name: import("convex/values").VString<string, "required">;
278
+ slug: import("convex/values").VString<string, "required">;
279
+ logo: import("convex/values").VString<string | undefined, "optional">;
280
+ projectId: import("convex/values").VString<string | undefined, "optional">;
281
+ metadata: import("convex/values").VAny<any, "optional", string>;
282
+ createdAt: import("convex/values").VFloat64<number, "required">;
283
+ updatedAt: import("convex/values").VFloat64<number, "required">;
284
+ }, "required", "name" | "metadata" | "createdAt" | "updatedAt" | "slug" | "logo" | "projectId" | `metadata.${string}`>, {
285
+ slug: ["slug", "_creationTime"];
286
+ createdAt: ["createdAt", "_creationTime"];
287
+ projectId: ["projectId", "_creationTime"];
288
+ }, {}, {}>;
289
+ /**
290
+ * Organization member table.
291
+ * Links users to organizations with roles.
292
+ */
293
+ member: import("convex/server").TableDefinition<import("convex/values").VObject<{
294
+ projectId?: string | undefined;
295
+ role: string;
296
+ createdAt: number;
297
+ updatedAt: number;
298
+ userId: string;
299
+ organizationId: string;
300
+ }, {
301
+ organizationId: import("convex/values").VString<string, "required">;
302
+ userId: import("convex/values").VString<string, "required">;
303
+ role: import("convex/values").VString<string, "required">;
304
+ projectId: import("convex/values").VString<string | undefined, "optional">;
305
+ createdAt: import("convex/values").VFloat64<number, "required">;
306
+ updatedAt: import("convex/values").VFloat64<number, "required">;
307
+ }, "required", "role" | "createdAt" | "updatedAt" | "userId" | "organizationId" | "projectId">, {
308
+ organizationId: ["organizationId", "_creationTime"];
309
+ userId: ["userId", "_creationTime"];
310
+ organizationId_userId: ["organizationId", "userId", "_creationTime"];
311
+ projectId: ["projectId", "_creationTime"];
312
+ }, {}, {}>;
313
+ /**
314
+ * Organization invitation table.
315
+ * Stores pending invitations to join an organization.
316
+ */
317
+ invitation: import("convex/server").TableDefinition<import("convex/values").VObject<{
318
+ projectId?: string | undefined;
319
+ email: string;
320
+ role: string;
321
+ createdAt: number;
322
+ expiresAt: number;
323
+ organizationId: string;
324
+ status: string;
325
+ inviterId: string;
326
+ }, {
327
+ organizationId: import("convex/values").VString<string, "required">;
328
+ email: import("convex/values").VString<string, "required">;
329
+ role: import("convex/values").VString<string, "required">;
330
+ inviterId: import("convex/values").VString<string, "required">;
331
+ projectId: import("convex/values").VString<string | undefined, "optional">;
332
+ status: import("convex/values").VString<string, "required">;
333
+ expiresAt: import("convex/values").VFloat64<number, "required">;
334
+ createdAt: import("convex/values").VFloat64<number, "required">;
335
+ }, "required", "email" | "role" | "createdAt" | "expiresAt" | "organizationId" | "status" | "projectId" | "inviterId">, {
336
+ organizationId: ["organizationId", "_creationTime"];
337
+ email: ["email", "_creationTime"];
338
+ status: ["status", "_creationTime"];
339
+ projectId: ["projectId", "_creationTime"];
340
+ }, {}, {}>;
341
+ /**
342
+ * SSO Provider table - stores SAML/OIDC connection configurations.
343
+ * Created by the @better-auth/sso plugin.
344
+ */
345
+ ssoProvider: import("convex/server").TableDefinition<import("convex/values").VObject<{
346
+ name?: string | undefined;
347
+ userId?: string | undefined;
348
+ organizationId?: string | undefined;
349
+ projectId?: string | undefined;
350
+ domainVerified?: boolean | undefined;
351
+ oidcConfig?: any;
352
+ samlConfig?: any;
353
+ active?: boolean | undefined;
354
+ createdAt: number;
355
+ updatedAt: number;
356
+ domain: string;
357
+ providerId: string;
358
+ issuer: string;
359
+ providerType: string;
360
+ }, {
361
+ organizationId: import("convex/values").VString<string | undefined, "optional">;
362
+ providerId: import("convex/values").VString<string, "required">;
363
+ issuer: import("convex/values").VString<string, "required">;
364
+ domain: import("convex/values").VString<string, "required">;
365
+ name: import("convex/values").VString<string | undefined, "optional">;
366
+ domainVerified: import("convex/values").VBoolean<boolean | undefined, "optional">;
367
+ projectId: import("convex/values").VString<string | undefined, "optional">;
368
+ oidcConfig: import("convex/values").VAny<any, "optional", string>;
369
+ samlConfig: import("convex/values").VAny<any, "optional", string>;
370
+ providerType: import("convex/values").VString<string, "required">;
371
+ active: import("convex/values").VBoolean<boolean | undefined, "optional">;
372
+ userId: import("convex/values").VString<string | undefined, "optional">;
373
+ createdAt: import("convex/values").VFloat64<number, "required">;
374
+ updatedAt: import("convex/values").VFloat64<number, "required">;
375
+ }, "required", "name" | "createdAt" | "updatedAt" | "userId" | "organizationId" | "projectId" | "domain" | "domainVerified" | "providerId" | "issuer" | "oidcConfig" | "samlConfig" | "providerType" | "active" | `oidcConfig.${string}` | `samlConfig.${string}`>, {
376
+ providerId: ["providerId", "_creationTime"];
377
+ domain: ["domain", "_creationTime"];
378
+ organizationId: ["organizationId", "_creationTime"];
379
+ projectId: ["projectId", "_creationTime"];
380
+ }, {}, {}>;
381
+ /**
382
+ * SCIM Provider table - stores SCIM directory connection configurations.
383
+ * Created by the @better-auth/scim plugin.
384
+ */
385
+ scimProvider: import("convex/server").TableDefinition<import("convex/values").VObject<{
386
+ name?: string | undefined;
387
+ userId?: string | undefined;
388
+ organizationId?: string | undefined;
389
+ projectId?: string | undefined;
390
+ active?: boolean | undefined;
391
+ scimToken?: string | undefined;
392
+ tokenHash?: string | undefined;
393
+ provider?: string | undefined;
394
+ endpointUrl?: string | undefined;
395
+ lastSyncAt?: number | undefined;
396
+ lastSyncStatus?: string | undefined;
397
+ createdAt: number;
398
+ updatedAt: number;
399
+ providerId: string;
400
+ }, {
401
+ organizationId: import("convex/values").VString<string | undefined, "optional">;
402
+ providerId: import("convex/values").VString<string, "required">;
403
+ scimToken: import("convex/values").VString<string | undefined, "optional">;
404
+ name: import("convex/values").VString<string | undefined, "optional">;
405
+ provider: import("convex/values").VString<string | undefined, "optional">;
406
+ projectId: import("convex/values").VString<string | undefined, "optional">;
407
+ endpointUrl: import("convex/values").VString<string | undefined, "optional">;
408
+ tokenHash: import("convex/values").VString<string | undefined, "optional">;
409
+ active: import("convex/values").VBoolean<boolean | undefined, "optional">;
410
+ lastSyncAt: import("convex/values").VFloat64<number | undefined, "optional">;
411
+ lastSyncStatus: import("convex/values").VString<string | undefined, "optional">;
412
+ userId: import("convex/values").VString<string | undefined, "optional">;
413
+ createdAt: import("convex/values").VFloat64<number, "required">;
414
+ updatedAt: import("convex/values").VFloat64<number, "required">;
415
+ }, "required", "name" | "createdAt" | "updatedAt" | "userId" | "organizationId" | "projectId" | "providerId" | "active" | "scimToken" | "tokenHash" | "provider" | "endpointUrl" | "lastSyncAt" | "lastSyncStatus">, {
416
+ providerId: ["providerId", "_creationTime"];
417
+ scimToken: ["scimToken", "_creationTime"];
418
+ organizationId: ["organizationId", "_creationTime"];
419
+ projectId: ["projectId", "_creationTime"];
420
+ }, {}, {}>;
421
+ /**
422
+ * API Key table - stores API keys for programmatic access.
423
+ * Created by the apiKey plugin from better-auth/plugins.
424
+ */
425
+ apikey: import("convex/server").TableDefinition<import("convex/values").VObject<{
426
+ name?: string | undefined;
427
+ metadata?: any;
428
+ expiresAt?: number | null | undefined;
429
+ enabled?: boolean | undefined;
430
+ permissions?: string | undefined;
431
+ projectId?: string | undefined;
432
+ remaining?: number | null | undefined;
433
+ lastRequest?: number | null | undefined;
434
+ prefix?: string | null | undefined;
435
+ refillAmount?: number | null | undefined;
436
+ refillInterval?: string | null | undefined;
437
+ rateLimitTimeWindow?: number | undefined;
438
+ rateLimitMax?: number | undefined;
439
+ rateLimitEnabled?: boolean | undefined;
440
+ start?: string | undefined;
441
+ lastRefillAt?: number | null | undefined;
442
+ requestCount?: number | undefined;
443
+ createdAt: number;
444
+ updatedAt: number;
445
+ userId: string;
446
+ key: string;
447
+ }, {
448
+ name: import("convex/values").VString<string | undefined, "optional">;
449
+ start: import("convex/values").VString<string | undefined, "optional">;
450
+ prefix: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
451
+ key: import("convex/values").VString<string, "required">;
452
+ userId: import("convex/values").VString<string, "required">;
453
+ projectId: import("convex/values").VString<string | undefined, "optional">;
454
+ refillInterval: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
455
+ refillAmount: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VFloat64<number, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
456
+ lastRefillAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VFloat64<number, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
457
+ enabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
458
+ rateLimitEnabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
459
+ rateLimitTimeWindow: import("convex/values").VFloat64<number | undefined, "optional">;
460
+ rateLimitMax: import("convex/values").VFloat64<number | undefined, "optional">;
461
+ remaining: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VFloat64<number, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
462
+ requestCount: import("convex/values").VFloat64<number | undefined, "optional">;
463
+ lastRequest: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VFloat64<number, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
464
+ expiresAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VFloat64<number, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
465
+ permissions: import("convex/values").VString<string | undefined, "optional">;
466
+ metadata: import("convex/values").VAny<any, "optional", string>;
467
+ createdAt: import("convex/values").VFloat64<number, "required">;
468
+ updatedAt: import("convex/values").VFloat64<number, "required">;
469
+ }, "required", "name" | "metadata" | "createdAt" | "updatedAt" | "userId" | "expiresAt" | "enabled" | "permissions" | "projectId" | "key" | "remaining" | "lastRequest" | "prefix" | "refillAmount" | "refillInterval" | "rateLimitTimeWindow" | "rateLimitMax" | "rateLimitEnabled" | "start" | "lastRefillAt" | "requestCount" | `metadata.${string}`>, {
470
+ key: ["key", "_creationTime"];
471
+ userId: ["userId", "_creationTime"];
472
+ start: ["start", "_creationTime"];
473
+ projectId: ["projectId", "_creationTime"];
474
+ }, {}, {}>;
475
+ /**
476
+ * Audit event table - stores all auditable auth events.
477
+ */
478
+ auditEvent: import("convex/server").TableDefinition<import("convex/values").VObject<{
479
+ metadata?: any;
480
+ ipAddress?: string | undefined;
481
+ userAgent?: string | undefined;
482
+ organizationId?: string | undefined;
483
+ version?: number | undefined;
484
+ actorName?: string | undefined;
485
+ actorEmail?: string | undefined;
486
+ actorMetadata?: any;
487
+ targets?: string | undefined;
488
+ requestId?: string | undefined;
489
+ changes?: string | undefined;
490
+ idempotencyKey?: string | undefined;
491
+ projectId?: string | undefined;
492
+ action: string;
493
+ createdAt: number;
494
+ actorType: string;
495
+ actorId: string;
496
+ occurredAt: number;
497
+ }, {
498
+ action: import("convex/values").VString<string, "required">;
499
+ version: import("convex/values").VFloat64<number | undefined, "optional">;
500
+ projectId: import("convex/values").VString<string | undefined, "optional">;
501
+ actorType: import("convex/values").VString<string, "required">;
502
+ actorId: import("convex/values").VString<string, "required">;
503
+ actorName: import("convex/values").VString<string | undefined, "optional">;
504
+ actorEmail: import("convex/values").VString<string | undefined, "optional">;
505
+ actorMetadata: import("convex/values").VAny<any, "optional", string>;
506
+ targets: import("convex/values").VString<string | undefined, "optional">;
507
+ organizationId: import("convex/values").VString<string | undefined, "optional">;
508
+ ipAddress: import("convex/values").VString<string | undefined, "optional">;
509
+ userAgent: import("convex/values").VString<string | undefined, "optional">;
510
+ requestId: import("convex/values").VString<string | undefined, "optional">;
511
+ changes: import("convex/values").VString<string | undefined, "optional">;
512
+ idempotencyKey: import("convex/values").VString<string | undefined, "optional">;
513
+ metadata: import("convex/values").VAny<any, "optional", string>;
514
+ occurredAt: import("convex/values").VFloat64<number, "required">;
515
+ createdAt: import("convex/values").VFloat64<number, "required">;
516
+ }, "required", "action" | "metadata" | "createdAt" | "ipAddress" | "userAgent" | "organizationId" | "version" | "actorType" | "actorId" | "actorName" | "actorEmail" | "actorMetadata" | "targets" | "requestId" | "changes" | "idempotencyKey" | "occurredAt" | "projectId" | `metadata.${string}` | `actorMetadata.${string}`>, {
517
+ action: ["action", "_creationTime"];
518
+ actorId: ["actorId", "_creationTime"];
519
+ organizationId: ["organizationId", "_creationTime"];
520
+ occurredAt: ["occurredAt", "_creationTime"];
521
+ idempotencyKey: ["idempotencyKey", "_creationTime"];
522
+ projectId: ["projectId", "_creationTime"];
523
+ projectId_occurredAt: ["projectId", "occurredAt", "_creationTime"];
524
+ }, {}, {}>;
525
+ /**
526
+ * Webhook endpoint table - stores registered webhook URLs.
527
+ */
528
+ webhookEndpoint: import("convex/server").TableDefinition<import("convex/values").VObject<{
529
+ eventTypes?: string | undefined;
530
+ successCount?: number | undefined;
531
+ failureCount?: number | undefined;
532
+ consecutiveFailures?: number | undefined;
533
+ lastDeliveryAt?: number | undefined;
534
+ lastDeliveryStatus?: string | undefined;
535
+ projectId?: string | undefined;
536
+ createdAt: number;
537
+ updatedAt: number;
538
+ url: string;
539
+ secret: string;
540
+ enabled: boolean;
541
+ }, {
542
+ url: import("convex/values").VString<string, "required">;
543
+ secret: import("convex/values").VString<string, "required">;
544
+ projectId: import("convex/values").VString<string | undefined, "optional">;
545
+ eventTypes: import("convex/values").VString<string | undefined, "optional">;
546
+ enabled: import("convex/values").VBoolean<boolean, "required">;
547
+ successCount: import("convex/values").VFloat64<number | undefined, "optional">;
548
+ failureCount: import("convex/values").VFloat64<number | undefined, "optional">;
549
+ consecutiveFailures: import("convex/values").VFloat64<number | undefined, "optional">;
550
+ lastDeliveryAt: import("convex/values").VFloat64<number | undefined, "optional">;
551
+ lastDeliveryStatus: import("convex/values").VString<string | undefined, "optional">;
552
+ createdAt: import("convex/values").VFloat64<number, "required">;
553
+ updatedAt: import("convex/values").VFloat64<number, "required">;
554
+ }, "required", "createdAt" | "updatedAt" | "url" | "secret" | "eventTypes" | "enabled" | "successCount" | "failureCount" | "consecutiveFailures" | "lastDeliveryAt" | "lastDeliveryStatus" | "projectId">, {
555
+ enabled: ["enabled", "_creationTime"];
556
+ projectId: ["projectId", "_creationTime"];
557
+ }, {}, {}>;
558
+ /**
559
+ * Webhook delivery table - stores delivery attempts for audit trail.
560
+ */
561
+ webhookDelivery: import("convex/server").TableDefinition<import("convex/values").VObject<{
562
+ httpStatus?: number | undefined;
563
+ responseBody?: string | undefined;
564
+ errorMessage?: string | undefined;
565
+ nextRetryAt?: number | undefined;
566
+ deliveredAt?: number | undefined;
567
+ projectId?: string | undefined;
568
+ createdAt: number;
569
+ endpointId: string;
570
+ eventType: string;
571
+ payload: string;
572
+ attempt: number;
573
+ maxAttempts: number;
574
+ status: string;
575
+ }, {
576
+ endpointId: import("convex/values").VString<string, "required">;
577
+ eventType: import("convex/values").VString<string, "required">;
578
+ projectId: import("convex/values").VString<string | undefined, "optional">;
579
+ payload: import("convex/values").VString<string, "required">;
580
+ attempt: import("convex/values").VFloat64<number, "required">;
581
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
582
+ status: import("convex/values").VString<string, "required">;
583
+ httpStatus: import("convex/values").VFloat64<number | undefined, "optional">;
584
+ responseBody: import("convex/values").VString<string | undefined, "optional">;
585
+ errorMessage: import("convex/values").VString<string | undefined, "optional">;
586
+ nextRetryAt: import("convex/values").VFloat64<number | undefined, "optional">;
587
+ deliveredAt: import("convex/values").VFloat64<number | undefined, "optional">;
588
+ createdAt: import("convex/values").VFloat64<number, "required">;
589
+ }, "required", "createdAt" | "endpointId" | "eventType" | "payload" | "attempt" | "maxAttempts" | "status" | "httpStatus" | "responseBody" | "errorMessage" | "nextRetryAt" | "deliveredAt" | "projectId">, {
590
+ endpointId: ["endpointId", "_creationTime"];
591
+ status: ["status", "_creationTime"];
592
+ nextRetryAt: ["nextRetryAt", "_creationTime"];
593
+ projectId: ["projectId", "_creationTime"];
594
+ }, {}, {}>;
595
+ /**
596
+ * Role definition table — stores custom RBAC roles defined via the dashboard.
597
+ * Better Auth has static code-defined roles; this table adds dynamic CRUD roles.
598
+ */
599
+ roleDefinition: import("convex/server").TableDefinition<import("convex/values").VObject<{
600
+ description?: string | undefined;
601
+ permissions?: string | undefined;
602
+ isDefault?: boolean | undefined;
603
+ projectId?: string | undefined;
604
+ name: string;
605
+ createdAt: number;
606
+ updatedAt: number;
607
+ slug: string;
608
+ }, {
609
+ name: import("convex/values").VString<string, "required">;
610
+ slug: import("convex/values").VString<string, "required">;
611
+ description: import("convex/values").VString<string | undefined, "optional">;
612
+ permissions: import("convex/values").VString<string | undefined, "optional">;
613
+ isDefault: import("convex/values").VBoolean<boolean | undefined, "optional">;
614
+ projectId: import("convex/values").VString<string | undefined, "optional">;
615
+ createdAt: import("convex/values").VFloat64<number, "required">;
616
+ updatedAt: import("convex/values").VFloat64<number, "required">;
617
+ }, "required", "name" | "createdAt" | "updatedAt" | "slug" | "description" | "permissions" | "isDefault" | "projectId">, {
618
+ slug: ["slug", "_creationTime"];
619
+ createdAt: ["createdAt", "_creationTime"];
620
+ projectId: ["projectId", "_creationTime"];
621
+ }, {}, {}>;
622
+ /**
623
+ * Permission definition table — stores custom RBAC permissions defined via the dashboard.
624
+ */
625
+ permissionDefinition: import("convex/server").TableDefinition<import("convex/values").VObject<{
626
+ description?: string | undefined;
627
+ projectId?: string | undefined;
628
+ name: string;
629
+ createdAt: number;
630
+ updatedAt: number;
631
+ slug: string;
632
+ }, {
633
+ name: import("convex/values").VString<string, "required">;
634
+ slug: import("convex/values").VString<string, "required">;
635
+ description: import("convex/values").VString<string | undefined, "optional">;
636
+ projectId: import("convex/values").VString<string | undefined, "optional">;
637
+ createdAt: import("convex/values").VFloat64<number, "required">;
638
+ updatedAt: import("convex/values").VFloat64<number, "required">;
639
+ }, "required", "name" | "createdAt" | "updatedAt" | "slug" | "description" | "projectId">, {
640
+ slug: ["slug", "_creationTime"];
641
+ createdAt: ["createdAt", "_creationTime"];
642
+ projectId: ["projectId", "_creationTime"];
643
+ }, {}, {}>;
644
+ /**
645
+ * Branding config table — stores UI branding settings for the hosted auth UI.
646
+ * One row per project (keyed by projectId).
647
+ */
648
+ brandingConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
649
+ primaryColor?: string | undefined;
650
+ bgColor?: string | undefined;
651
+ borderRadius?: number | undefined;
652
+ darkMode?: boolean | undefined;
653
+ customCss?: string | undefined;
654
+ font?: string | undefined;
655
+ logoUrl?: string | undefined;
656
+ projectId?: string | undefined;
657
+ createdAt: number;
658
+ updatedAt: number;
659
+ }, {
660
+ projectId: import("convex/values").VString<string | undefined, "optional">;
661
+ primaryColor: import("convex/values").VString<string | undefined, "optional">;
662
+ bgColor: import("convex/values").VString<string | undefined, "optional">;
663
+ borderRadius: import("convex/values").VFloat64<number | undefined, "optional">;
664
+ darkMode: import("convex/values").VBoolean<boolean | undefined, "optional">;
665
+ customCss: import("convex/values").VString<string | undefined, "optional">;
666
+ font: import("convex/values").VString<string | undefined, "optional">;
667
+ logoUrl: import("convex/values").VString<string | undefined, "optional">;
668
+ createdAt: import("convex/values").VFloat64<number, "required">;
669
+ updatedAt: import("convex/values").VFloat64<number, "required">;
670
+ }, "required", "createdAt" | "updatedAt" | "primaryColor" | "bgColor" | "borderRadius" | "darkMode" | "customCss" | "font" | "logoUrl" | "projectId">, {
671
+ projectId: ["projectId", "_creationTime"];
672
+ }, {}, {}>;
673
+ /**
674
+ * Email template table — stores custom email templates as JSON block arrays.
675
+ * Templates are created/edited via the dashboard's visual email editor and
676
+ * can be sent programmatically via the SDK using the template slug.
677
+ * Scoped per project.
678
+ */
679
+ emailTemplate: import("convex/server").TableDefinition<import("convex/values").VObject<{
680
+ description?: string | undefined;
681
+ previewText?: string | undefined;
682
+ variablesJson?: string | undefined;
683
+ builtIn?: boolean | undefined;
684
+ builtInType?: string | undefined;
685
+ projectId?: string | undefined;
686
+ name: string;
687
+ createdAt: number;
688
+ updatedAt: number;
689
+ slug: string;
690
+ subject: string;
691
+ category: string;
692
+ blocksJson: string;
693
+ }, {
694
+ name: import("convex/values").VString<string, "required">;
695
+ slug: import("convex/values").VString<string, "required">;
696
+ subject: import("convex/values").VString<string, "required">;
697
+ previewText: import("convex/values").VString<string | undefined, "optional">;
698
+ category: import("convex/values").VString<string, "required">;
699
+ description: import("convex/values").VString<string | undefined, "optional">;
700
+ /** JSON-serialized EmailBlock[] array. */
701
+ blocksJson: import("convex/values").VString<string, "required">;
702
+ /** JSON-serialized EmailTemplateVariable[] array. */
703
+ variablesJson: import("convex/values").VString<string | undefined, "optional">;
704
+ /** Whether this is a built-in auth template (not deletable). */
705
+ builtIn: import("convex/values").VBoolean<boolean | undefined, "optional">;
706
+ /** The built-in email type this overrides (if any). */
707
+ builtInType: import("convex/values").VString<string | undefined, "optional">;
708
+ projectId: import("convex/values").VString<string | undefined, "optional">;
709
+ createdAt: import("convex/values").VFloat64<number, "required">;
710
+ updatedAt: import("convex/values").VFloat64<number, "required">;
711
+ }, "required", "name" | "createdAt" | "updatedAt" | "slug" | "description" | "subject" | "previewText" | "category" | "blocksJson" | "variablesJson" | "builtIn" | "builtInType" | "projectId">, {
712
+ slug: ["slug", "_creationTime"];
713
+ category: ["category", "_creationTime"];
714
+ builtInType: ["builtInType", "_creationTime"];
715
+ createdAt: ["createdAt", "_creationTime"];
716
+ projectId: ["projectId", "_creationTime"];
717
+ projectId_slug: ["projectId", "slug", "_creationTime"];
718
+ }, {}, {}>;
719
+ /**
720
+ * Email config table — stores per-email-type enable/disable toggles.
721
+ * Each row represents a distinct email type (e.g. "welcome", "password-reset").
722
+ * Scoped per project.
723
+ */
724
+ emailConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
725
+ description?: string | undefined;
726
+ projectId?: string | undefined;
727
+ name: string;
728
+ createdAt: number;
729
+ updatedAt: number;
730
+ enabled: boolean;
731
+ category: string;
732
+ emailType: string;
733
+ }, {
734
+ emailType: import("convex/values").VString<string, "required">;
735
+ name: import("convex/values").VString<string, "required">;
736
+ description: import("convex/values").VString<string | undefined, "optional">;
737
+ enabled: import("convex/values").VBoolean<boolean, "required">;
738
+ category: import("convex/values").VString<string, "required">;
739
+ projectId: import("convex/values").VString<string | undefined, "optional">;
740
+ createdAt: import("convex/values").VFloat64<number, "required">;
741
+ updatedAt: import("convex/values").VFloat64<number, "required">;
742
+ }, "required", "name" | "createdAt" | "updatedAt" | "enabled" | "description" | "category" | "emailType" | "projectId">, {
743
+ emailType: ["emailType", "_creationTime"];
744
+ category: ["category", "_creationTime"];
745
+ projectId: ["projectId", "_creationTime"];
746
+ }, {}, {}>;
747
+ /**
748
+ * Dashboard config table — stores runtime overrides for the dashboard
749
+ * configuration (auth methods, social providers, features, sessions).
750
+ * One row per project.
751
+ */
752
+ dashboardConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
753
+ projectId?: string | undefined;
754
+ createdAt: number;
755
+ updatedAt: number;
756
+ configJson: string;
757
+ }, {
758
+ configJson: import("convex/values").VString<string, "required">;
759
+ projectId: import("convex/values").VString<string | undefined, "optional">;
760
+ createdAt: import("convex/values").VFloat64<number, "required">;
761
+ updatedAt: import("convex/values").VFloat64<number, "required">;
762
+ }, "required", "createdAt" | "updatedAt" | "configJson" | "projectId">, {
763
+ projectId: ["projectId", "_creationTime"];
764
+ }, {}, {}>;
765
+ /**
766
+ * Domain config table — stores service domain settings (email, admin portal,
767
+ * auth API, authkit, custom). Managed via the dashboard.
768
+ */
769
+ domainConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
770
+ description?: string | undefined;
771
+ isDefault?: boolean | undefined;
772
+ projectId?: string | undefined;
773
+ createdAt: number;
774
+ updatedAt: number;
775
+ domainKey: string;
776
+ title: string;
777
+ value: string;
778
+ }, {
779
+ domainKey: import("convex/values").VString<string, "required">;
780
+ title: import("convex/values").VString<string, "required">;
781
+ description: import("convex/values").VString<string | undefined, "optional">;
782
+ value: import("convex/values").VString<string, "required">;
783
+ isDefault: import("convex/values").VBoolean<boolean | undefined, "optional">;
784
+ projectId: import("convex/values").VString<string | undefined, "optional">;
785
+ createdAt: import("convex/values").VFloat64<number, "required">;
786
+ updatedAt: import("convex/values").VFloat64<number, "required">;
787
+ }, "required", "createdAt" | "updatedAt" | "description" | "isDefault" | "domainKey" | "title" | "value" | "projectId">, {
788
+ domainKey: ["domainKey", "_creationTime"];
789
+ createdAt: ["createdAt", "_creationTime"];
790
+ projectId: ["projectId", "_creationTime"];
791
+ }, {}, {}>;
792
+ /**
793
+ * Redirect config table — stores redirect URIs and endpoint settings.
794
+ * One row per project.
795
+ */
796
+ redirectConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
797
+ projectId?: string | undefined;
798
+ createdAt: number;
799
+ updatedAt: number;
800
+ configJson: string;
801
+ }, {
802
+ configJson: import("convex/values").VString<string, "required">;
803
+ projectId: import("convex/values").VString<string | undefined, "optional">;
804
+ createdAt: import("convex/values").VFloat64<number, "required">;
805
+ updatedAt: import("convex/values").VFloat64<number, "required">;
806
+ }, "required", "createdAt" | "updatedAt" | "configJson" | "projectId">, {
807
+ projectId: ["projectId", "_creationTime"];
808
+ }, {}, {}>;
809
+ /**
810
+ * Action table — stores automated action definitions triggered by events.
811
+ * Each action maps an event type to a webhook URL.
812
+ * Scoped per project.
813
+ */
814
+ actionConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
815
+ description?: string | undefined;
816
+ projectId?: string | undefined;
817
+ name: string;
818
+ createdAt: number;
819
+ updatedAt: number;
820
+ triggerEvent: string;
821
+ webhookUrl: string;
822
+ }, {
823
+ name: import("convex/values").VString<string, "required">;
824
+ description: import("convex/values").VString<string | undefined, "optional">;
825
+ triggerEvent: import("convex/values").VString<string, "required">;
826
+ webhookUrl: import("convex/values").VString<string, "required">;
827
+ projectId: import("convex/values").VString<string | undefined, "optional">;
828
+ createdAt: import("convex/values").VFloat64<number, "required">;
829
+ updatedAt: import("convex/values").VFloat64<number, "required">;
830
+ }, "required", "name" | "createdAt" | "updatedAt" | "description" | "triggerEvent" | "webhookUrl" | "projectId">, {
831
+ triggerEvent: ["triggerEvent", "_creationTime"];
832
+ createdAt: ["createdAt", "_creationTime"];
833
+ projectId: ["projectId", "_creationTime"];
834
+ }, {}, {}>;
835
+ /**
836
+ * Radar config table — stores bot protection / radar settings.
837
+ * One row per project.
838
+ */
839
+ radarConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
840
+ projectId?: string | undefined;
841
+ createdAt: number;
842
+ updatedAt: number;
843
+ configJson: string;
844
+ }, {
845
+ configJson: import("convex/values").VString<string, "required">;
846
+ projectId: import("convex/values").VString<string | undefined, "optional">;
847
+ createdAt: import("convex/values").VFloat64<number, "required">;
848
+ updatedAt: import("convex/values").VFloat64<number, "required">;
849
+ }, "required", "createdAt" | "updatedAt" | "configJson" | "projectId">, {
850
+ projectId: ["projectId", "_creationTime"];
851
+ }, {}, {}>;
852
+ /**
853
+ * Email provider config table — stores email provider settings
854
+ * (which provider is active, API keys, etc.).
855
+ * One row per project.
856
+ */
857
+ emailProviderConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
858
+ projectId?: string | undefined;
859
+ createdAt: number;
860
+ updatedAt: number;
861
+ configJson: string;
862
+ }, {
863
+ configJson: import("convex/values").VString<string, "required">;
864
+ projectId: import("convex/values").VString<string | undefined, "optional">;
865
+ createdAt: import("convex/values").VFloat64<number, "required">;
866
+ updatedAt: import("convex/values").VFloat64<number, "required">;
867
+ }, "required", "createdAt" | "updatedAt" | "configJson" | "projectId">, {
868
+ projectId: ["projectId", "_creationTime"];
869
+ }, {}, {}>;
870
+ /**
871
+ * Resource type table — stores fine-grained authorization resource types.
872
+ * Scoped per project.
873
+ */
874
+ resourceType: import("convex/server").TableDefinition<import("convex/values").VObject<{
875
+ description?: string | undefined;
876
+ projectId?: string | undefined;
877
+ name: string;
878
+ createdAt: number;
879
+ updatedAt: number;
880
+ slug: string;
881
+ }, {
882
+ name: import("convex/values").VString<string, "required">;
883
+ slug: import("convex/values").VString<string, "required">;
884
+ description: import("convex/values").VString<string | undefined, "optional">;
885
+ projectId: import("convex/values").VString<string | undefined, "optional">;
886
+ createdAt: import("convex/values").VFloat64<number, "required">;
887
+ updatedAt: import("convex/values").VFloat64<number, "required">;
888
+ }, "required", "name" | "createdAt" | "updatedAt" | "slug" | "description" | "projectId">, {
889
+ slug: ["slug", "_creationTime"];
890
+ createdAt: ["createdAt", "_creationTime"];
891
+ projectId: ["projectId", "_creationTime"];
892
+ }, {}, {}>;
893
+ /**
894
+ * Addon config table — stores third-party integration enable/disable state.
895
+ * Singleton row with JSON-serialized config.
896
+ */
897
+ addonConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
898
+ projectId?: string | undefined;
899
+ createdAt: number;
900
+ updatedAt: number;
901
+ configJson: string;
902
+ }, {
903
+ configJson: import("convex/values").VString<string, "required">;
904
+ projectId: import("convex/values").VString<string | undefined, "optional">;
905
+ createdAt: import("convex/values").VFloat64<number, "required">;
906
+ updatedAt: import("convex/values").VFloat64<number, "required">;
907
+ }, "required", "createdAt" | "updatedAt" | "configJson" | "projectId">, {
908
+ projectId: ["projectId", "_creationTime"];
909
+ }, {}, {}>;
910
+ /**
911
+ * Project config table — stores per-project configuration overrides.
912
+ * One row per project.
913
+ */
914
+ projectConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
915
+ projectId?: string | undefined;
916
+ createdAt: number;
917
+ updatedAt: number;
918
+ configJson: string;
919
+ }, {
920
+ configJson: import("convex/values").VString<string, "required">;
921
+ projectId: import("convex/values").VString<string | undefined, "optional">;
922
+ createdAt: import("convex/values").VFloat64<number, "required">;
923
+ updatedAt: import("convex/values").VFloat64<number, "required">;
924
+ }, "required", "createdAt" | "updatedAt" | "configJson" | "projectId">, {
925
+ projectId: ["projectId", "_creationTime"];
926
+ }, {}, {}>;
927
+ /**
928
+ * Vault secret table - stores encrypted secrets.
929
+ * Values are encrypted at rest using envelope encryption.
930
+ * Scoped per project.
931
+ */
932
+ vaultSecret: import("convex/server").TableDefinition<import("convex/values").VObject<{
933
+ metadata?: any;
934
+ organizationId?: string | undefined;
935
+ projectId?: string | undefined;
936
+ context?: string | undefined;
937
+ name: string;
938
+ createdAt: number;
939
+ updatedAt: number;
940
+ version: number;
941
+ encryptedValue: string;
942
+ iv: string;
943
+ }, {
944
+ name: import("convex/values").VString<string, "required">;
945
+ encryptedValue: import("convex/values").VString<string, "required">;
946
+ iv: import("convex/values").VString<string, "required">;
947
+ projectId: import("convex/values").VString<string | undefined, "optional">;
948
+ context: import("convex/values").VString<string | undefined, "optional">;
949
+ organizationId: import("convex/values").VString<string | undefined, "optional">;
950
+ version: import("convex/values").VFloat64<number, "required">;
951
+ metadata: import("convex/values").VAny<any, "optional", string>;
952
+ createdAt: import("convex/values").VFloat64<number, "required">;
953
+ updatedAt: import("convex/values").VFloat64<number, "required">;
954
+ }, "required", "name" | "metadata" | "createdAt" | "updatedAt" | "organizationId" | "version" | "projectId" | "encryptedValue" | "iv" | "context" | `metadata.${string}`>, {
955
+ name: ["name", "_creationTime"];
956
+ organizationId: ["organizationId", "_creationTime"];
957
+ name_context: ["name", "context", "_creationTime"];
958
+ projectId: ["projectId", "_creationTime"];
959
+ }, {}, {}>;
960
+ /**
961
+ * Portal session table - stores short-lived admin portal sessions.
962
+ * Each session grants an org admin access to a specific portal intent.
963
+ * Scoped per project.
964
+ */
965
+ portalSession: import("convex/server").TableDefinition<import("convex/values").VObject<{
966
+ projectId?: string | undefined;
967
+ returnUrl?: string | undefined;
968
+ createdAt: number;
969
+ expiresAt: number;
970
+ organizationId: string;
971
+ token: string;
972
+ intent: string;
973
+ }, {
974
+ organizationId: import("convex/values").VString<string, "required">;
975
+ intent: import("convex/values").VString<string, "required">;
976
+ returnUrl: import("convex/values").VString<string | undefined, "optional">;
977
+ token: import("convex/values").VString<string, "required">;
978
+ projectId: import("convex/values").VString<string | undefined, "optional">;
979
+ expiresAt: import("convex/values").VFloat64<number, "required">;
980
+ createdAt: import("convex/values").VFloat64<number, "required">;
981
+ }, "required", "createdAt" | "expiresAt" | "organizationId" | "token" | "projectId" | "intent" | "returnUrl">, {
982
+ token: ["token", "_creationTime"];
983
+ organizationId: ["organizationId", "_creationTime"];
984
+ projectId: ["projectId", "_creationTime"];
985
+ }, {}, {}>;
986
+ /**
987
+ * Domain verification table - tracks domain ownership verification.
988
+ * Scoped per project.
989
+ */
990
+ domainVerification: import("convex/server").TableDefinition<import("convex/values").VObject<{
991
+ expiresAt?: number | undefined;
992
+ projectId?: string | undefined;
993
+ verifiedAt?: number | undefined;
994
+ lastCheckedAt?: number | undefined;
995
+ checkCount?: number | undefined;
996
+ createdAt: number;
997
+ updatedAt: number;
998
+ organizationId: string;
999
+ method: string;
1000
+ domain: string;
1001
+ state: string;
1002
+ txtRecordName: string;
1003
+ txtRecordValue: string;
1004
+ }, {
1005
+ organizationId: import("convex/values").VString<string, "required">;
1006
+ domain: import("convex/values").VString<string, "required">;
1007
+ projectId: import("convex/values").VString<string | undefined, "optional">;
1008
+ state: import("convex/values").VString<string, "required">;
1009
+ method: import("convex/values").VString<string, "required">;
1010
+ txtRecordName: import("convex/values").VString<string, "required">;
1011
+ txtRecordValue: import("convex/values").VString<string, "required">;
1012
+ verifiedAt: import("convex/values").VFloat64<number | undefined, "optional">;
1013
+ expiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
1014
+ lastCheckedAt: import("convex/values").VFloat64<number | undefined, "optional">;
1015
+ checkCount: import("convex/values").VFloat64<number | undefined, "optional">;
1016
+ createdAt: import("convex/values").VFloat64<number, "required">;
1017
+ updatedAt: import("convex/values").VFloat64<number, "required">;
1018
+ }, "required", "createdAt" | "updatedAt" | "expiresAt" | "organizationId" | "projectId" | "method" | "domain" | "state" | "txtRecordName" | "txtRecordValue" | "verifiedAt" | "lastCheckedAt" | "checkCount">, {
1019
+ domain: ["domain", "_creationTime"];
1020
+ organizationId: ["organizationId", "_creationTime"];
1021
+ state: ["state", "_creationTime"];
1022
+ projectId: ["projectId", "_creationTime"];
1023
+ }, {}, {}>;
1024
+ }, true>;
1025
+ export default schema;
1026
+ //# sourceMappingURL=schema.d.ts.map