@absolutejs/auth 0.69.4 → 0.69.5

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 (110) hide show
  1. package/dist/abuse/captcha.d.ts +11 -0
  2. package/dist/abuse/config.d.ts +29 -0
  3. package/dist/adaptive/config.d.ts +34 -0
  4. package/dist/adaptive/fingerprint.d.ts +2 -0
  5. package/dist/adaptive/inMemoryStores.d.ts +3 -0
  6. package/dist/adaptive/postgresStores.d.ts +245 -0
  7. package/dist/adaptive/types.d.ts +62 -0
  8. package/dist/agents/idJag.d.ts +49 -0
  9. package/dist/agents/inMemoryStores.d.ts +4 -0
  10. package/dist/agents/index.d.ts +13 -0
  11. package/dist/agents/oidcAdapter.d.ts +20 -0
  12. package/dist/agents/postgresStores.d.ts +1176 -0
  13. package/dist/agents/registrationClient.d.ts +50 -0
  14. package/dist/apikeys/inMemoryStores.d.ts +4 -0
  15. package/dist/apikeys/postgresStores.d.ts +359 -0
  16. package/dist/audit/export.d.ts +2 -0
  17. package/dist/audit/inMemoryAuditStore.d.ts +2 -0
  18. package/dist/audit/integrity.d.ts +19 -0
  19. package/dist/audit/postgresAuditStore.d.ts +116 -0
  20. package/dist/audit/siem.d.ts +11 -0
  21. package/dist/cli/import/auth0.d.ts +2 -0
  22. package/dist/cli/import/clerk.d.ts +2 -0
  23. package/dist/cli/import/index.d.ts +10 -0
  24. package/dist/cli/import/lucia.d.ts +2 -0
  25. package/dist/cli/import/nextauth.d.ts +2 -0
  26. package/dist/cli/import/supabase.d.ts +2 -0
  27. package/dist/cli/import/types.d.ts +27 -0
  28. package/dist/cli/migrate.d.ts +2 -0
  29. package/dist/client/components/react/SignIn.d.ts +32 -0
  30. package/dist/client/components/react/SignUp.d.ts +29 -0
  31. package/dist/client/components/react/UserButton.d.ts +36 -0
  32. package/dist/client/createAuthClient.d.ts +311 -0
  33. package/dist/client/index.d.ts +6 -0
  34. package/dist/client/mobile.d.ts +87 -0
  35. package/dist/client/passkeyHelpers.d.ts +19 -0
  36. package/dist/client/react.d.ts +87 -0
  37. package/dist/client/runtimeTransport.d.ts +3 -0
  38. package/dist/client/sessionExpiry.d.ts +37 -0
  39. package/dist/client/solid.d.ts +86 -0
  40. package/dist/client/svelte.d.ts +86 -0
  41. package/dist/client/vue.d.ts +88 -0
  42. package/dist/compliance/redaction.d.ts +8 -0
  43. package/dist/fga/config.d.ts +53 -0
  44. package/dist/fga/inMemoryStores.d.ts +3 -0
  45. package/dist/fga/postgresStores.d.ts +116 -0
  46. package/dist/fga/redisCheckCache.d.ts +11 -0
  47. package/dist/fga/schema.d.ts +2 -0
  48. package/dist/fga/types.d.ts +28 -0
  49. package/dist/fingerprint-client/index.d.ts +26 -0
  50. package/dist/htmx/index.d.ts +2 -0
  51. package/dist/index.d.ts +4042 -0
  52. package/dist/linkedProviders/index.d.ts +3 -0
  53. package/dist/lockout/inMemoryLockoutStore.d.ts +2 -0
  54. package/dist/lockout/postgresLockoutStore.d.ts +71 -0
  55. package/dist/lockout/redisLockoutStore.d.ts +3 -0
  56. package/dist/manifest.d.ts +19 -0
  57. package/dist/manifest.json +386 -0
  58. package/dist/mfa/postgresMfaStore.d.ts +266 -0
  59. package/dist/migrations/generate.d.ts +2 -0
  60. package/dist/migrations/index.d.ts +6 -0
  61. package/dist/migrations/runner.d.ts +22 -0
  62. package/dist/migrations/types.d.ts +14 -0
  63. package/dist/oidc/clientIdMetadata.d.ts +28 -0
  64. package/dist/oidc/inMemoryStores.d.ts +12 -0
  65. package/dist/oidc/inMemoryVciStores.d.ts +3 -0
  66. package/dist/oidc/index.d.ts +14 -0
  67. package/dist/oidc/operator.d.ts +14 -0
  68. package/dist/oidc/postgresStores.d.ts +1361 -0
  69. package/dist/oidc/vciRoutes.d.ts +56 -0
  70. package/dist/organizations/inMemoryOrganizationStore.d.ts +2 -0
  71. package/dist/organizations/postgresOrganizationStore.d.ts +340 -0
  72. package/dist/passwordless/inMemoryPasswordlessTokenStore.d.ts +2 -0
  73. package/dist/passwordless/postgresPasswordlessTokenStore.d.ts +56 -0
  74. package/dist/plugins/denyDisposableEmail.d.ts +7 -0
  75. package/dist/plugins/discordAlert.d.ts +7 -0
  76. package/dist/plugins/geoBlock.d.ts +8 -0
  77. package/dist/plugins/index.d.ts +12 -0
  78. package/dist/plugins/pagerdutyAlert.d.ts +9 -0
  79. package/dist/plugins/posthogIdentify.d.ts +7 -0
  80. package/dist/plugins/slackAlert.d.ts +7 -0
  81. package/dist/portal/inMemorySetupSessionStore.d.ts +2 -0
  82. package/dist/portal/postgresSetupSessionStore.d.ts +116 -0
  83. package/dist/providers/index.d.ts +2 -0
  84. package/dist/roles/inMemoryRoleStore.d.ts +2 -0
  85. package/dist/roles/postgresRoleStore.d.ts +86 -0
  86. package/dist/roles/resolver.d.ts +17 -0
  87. package/dist/saml.d.ts +1 -0
  88. package/dist/scim/inMemoryScimTokenStore.d.ts +2 -0
  89. package/dist/scim/postgresScimTokenStore.d.ts +86 -0
  90. package/dist/server.d.ts +34 -0
  91. package/dist/sso/inMemorySamlServiceProviderStore.d.ts +2 -0
  92. package/dist/sso/inMemorySsoConnectionStore.d.ts +2 -0
  93. package/dist/sso/nodeSamlAdapter.d.ts +8 -0
  94. package/dist/sso/postgresSamlServiceProviderStore.d.ts +101 -0
  95. package/dist/sso/postgresSsoConnectionStore.d.ts +117 -0
  96. package/dist/sso/samlIdpRoutes.d.ts +268 -0
  97. package/dist/vault/index.d.ts +5 -0
  98. package/dist/vc/inMemoryVpStores.d.ts +2 -0
  99. package/dist/vc/openid4vp.d.ts +82 -0
  100. package/dist/vc/postgresVcStores.d.ts +300 -0
  101. package/dist/vc/statusList.d.ts +29 -0
  102. package/dist/vc/statusListRoutes.d.ts +169 -0
  103. package/dist/vc/vpRoutes.d.ts +224 -0
  104. package/dist/webauthn/inMemoryWebAuthnCredentialStore.d.ts +2 -0
  105. package/dist/webauthn/postgresWebAuthnCredentialStore.d.ts +146 -0
  106. package/dist/webauthn/simpleWebAuthnAdapter.d.ts +3 -0
  107. package/dist/webauthn.d.ts +1 -0
  108. package/dist/webhooks/inMemoryStore.d.ts +2 -0
  109. package/dist/webhooks/postgresStore.d.ts +116 -0
  110. package/package.json +3 -3
@@ -0,0 +1,50 @@
1
+ type JsonObject = Record<string, unknown>;
2
+ export type DiscoveredAgentRegistration = {
3
+ agentAuth: {
4
+ claimEndpoint: string;
5
+ identityAssertionTypes: string[];
6
+ identityEndpoint: string;
7
+ identityTypes: string[];
8
+ skill: string;
9
+ };
10
+ authorizationServer: string;
11
+ resource: string;
12
+ resourceMetadataUrl: string;
13
+ scopes: string[];
14
+ tokenEndpoint: string;
15
+ };
16
+ export type AgentRegistrationClientOptions = {
17
+ allowInsecureLocalhost?: boolean;
18
+ maxResponseBytes?: number;
19
+ request?: typeof fetch;
20
+ };
21
+ /** Discovers agent registration using RFC 9728 followed by RFC 8414. Network
22
+ * policy is injected through `request`; redirects are rejected by default. */
23
+ export declare const createAgentRegistrationClient: (discovery: DiscoveredAgentRegistration, options?: AgentRegistrationClientOptions) => {
24
+ beginAnonymous: () => Promise<{
25
+ body: JsonObject;
26
+ response: Response;
27
+ }>;
28
+ beginServiceAuth: (loginHint: string) => Promise<{
29
+ body: JsonObject;
30
+ response: Response;
31
+ }>;
32
+ beginVerified: (assertion: string) => Promise<{
33
+ body: JsonObject;
34
+ response: Response;
35
+ }>;
36
+ claim: (claimToken: string, email: string) => Promise<{
37
+ body: JsonObject;
38
+ response: Response;
39
+ }>;
40
+ exchangeAssertion: (assertion: string) => Promise<{
41
+ body: JsonObject;
42
+ response: Response;
43
+ }>;
44
+ pollClaim: (claimToken: string) => Promise<{
45
+ body: JsonObject;
46
+ response: Response;
47
+ }>;
48
+ };
49
+ export declare const discoverAgentRegistration: (resource: string, options?: AgentRegistrationClientOptions) => Promise<DiscoveredAgentRegistration>;
50
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { AccessTokenStore, ApiClientStore, ApiKeyStore } from './types';
2
+ export declare const createInMemoryAccessTokenStore: () => AccessTokenStore;
3
+ export declare const createInMemoryApiClientStore: () => ApiClientStore;
4
+ export declare const createInMemoryApiKeyStore: () => ApiKeyStore;
@@ -0,0 +1,359 @@
1
+ import { type AnyPgDatabase } from '../stores/postgres';
2
+ import type { AccessTokenStore, ApiClientStore, ApiKeyStore } from './types';
3
+ export declare const accessTokensTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
4
+ name: "auth_access_tokens";
5
+ schema: undefined;
6
+ columns: {
7
+ client_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_access_tokens", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
8
+ name: string;
9
+ tableName: "auth_access_tokens";
10
+ dataType: "string";
11
+ data: string;
12
+ driverParam: string;
13
+ notNull: true;
14
+ hasDefault: false;
15
+ isPrimaryKey: false;
16
+ isAutoincrement: false;
17
+ hasRuntimeDefault: false;
18
+ enumValues: undefined;
19
+ identity: undefined;
20
+ generated: undefined;
21
+ }>;
22
+ created_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_access_tokens", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
23
+ name: string;
24
+ tableName: "auth_access_tokens";
25
+ dataType: "number int53";
26
+ data: number;
27
+ driverParam: string | number;
28
+ notNull: true;
29
+ hasDefault: false;
30
+ isPrimaryKey: false;
31
+ isAutoincrement: false;
32
+ hasRuntimeDefault: false;
33
+ enumValues: undefined;
34
+ identity: undefined;
35
+ generated: undefined;
36
+ }>;
37
+ expires_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_access_tokens", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
38
+ name: string;
39
+ tableName: "auth_access_tokens";
40
+ dataType: "number int53";
41
+ data: number;
42
+ driverParam: string | number;
43
+ notNull: true;
44
+ hasDefault: false;
45
+ isPrimaryKey: false;
46
+ isAutoincrement: false;
47
+ hasRuntimeDefault: false;
48
+ enumValues: undefined;
49
+ identity: undefined;
50
+ generated: undefined;
51
+ }>;
52
+ hashed_token: import("drizzle-orm/pg-core").PgBuildColumn<"auth_access_tokens", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
53
+ name: string;
54
+ tableName: "auth_access_tokens";
55
+ dataType: "string";
56
+ data: string;
57
+ driverParam: string;
58
+ notNull: true;
59
+ hasDefault: false;
60
+ isPrimaryKey: false;
61
+ isAutoincrement: false;
62
+ hasRuntimeDefault: false;
63
+ enumValues: undefined;
64
+ identity: undefined;
65
+ generated: undefined;
66
+ }>;
67
+ owner_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_access_tokens", import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, {
68
+ name: string;
69
+ tableName: "auth_access_tokens";
70
+ dataType: "string";
71
+ data: string;
72
+ driverParam: string;
73
+ notNull: false;
74
+ hasDefault: false;
75
+ isPrimaryKey: false;
76
+ isAutoincrement: false;
77
+ hasRuntimeDefault: false;
78
+ enumValues: undefined;
79
+ identity: undefined;
80
+ generated: undefined;
81
+ }>;
82
+ scopes: import("drizzle-orm/pg-core").PgBuildColumn<"auth_access_tokens", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").SetDimensions<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, 1>>, {
83
+ name: string;
84
+ tableName: "auth_access_tokens";
85
+ dataType: "string";
86
+ data: string[];
87
+ driverParam: string | string[];
88
+ notNull: true;
89
+ hasDefault: false;
90
+ isPrimaryKey: false;
91
+ isAutoincrement: false;
92
+ hasRuntimeDefault: false;
93
+ enumValues: undefined;
94
+ identity: undefined;
95
+ generated: undefined;
96
+ }>;
97
+ token_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_access_tokens", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
98
+ name: string;
99
+ tableName: "auth_access_tokens";
100
+ dataType: "string";
101
+ data: string;
102
+ driverParam: string;
103
+ notNull: true;
104
+ hasDefault: false;
105
+ isPrimaryKey: false;
106
+ isAutoincrement: false;
107
+ hasRuntimeDefault: false;
108
+ enumValues: undefined;
109
+ identity: undefined;
110
+ generated: undefined;
111
+ }>;
112
+ };
113
+ dialect: "pg";
114
+ }>;
115
+ export declare const apiClientsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
116
+ name: "auth_api_clients";
117
+ schema: undefined;
118
+ columns: {
119
+ client_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_clients", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
120
+ name: string;
121
+ tableName: "auth_api_clients";
122
+ dataType: "string";
123
+ data: string;
124
+ driverParam: string;
125
+ notNull: true;
126
+ hasDefault: false;
127
+ isPrimaryKey: false;
128
+ isAutoincrement: false;
129
+ hasRuntimeDefault: false;
130
+ enumValues: undefined;
131
+ identity: undefined;
132
+ generated: undefined;
133
+ }>;
134
+ created_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_clients", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
135
+ name: string;
136
+ tableName: "auth_api_clients";
137
+ dataType: "number int53";
138
+ data: number;
139
+ driverParam: string | number;
140
+ notNull: true;
141
+ hasDefault: false;
142
+ isPrimaryKey: false;
143
+ isAutoincrement: false;
144
+ hasRuntimeDefault: false;
145
+ enumValues: undefined;
146
+ identity: undefined;
147
+ generated: undefined;
148
+ }>;
149
+ hashed_secret: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_clients", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
150
+ name: string;
151
+ tableName: "auth_api_clients";
152
+ dataType: "string";
153
+ data: string;
154
+ driverParam: string;
155
+ notNull: true;
156
+ hasDefault: false;
157
+ isPrimaryKey: false;
158
+ isAutoincrement: false;
159
+ hasRuntimeDefault: false;
160
+ enumValues: undefined;
161
+ identity: undefined;
162
+ generated: undefined;
163
+ }>;
164
+ name: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_clients", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
165
+ name: string;
166
+ tableName: "auth_api_clients";
167
+ dataType: "string";
168
+ data: string;
169
+ driverParam: string;
170
+ notNull: true;
171
+ hasDefault: false;
172
+ isPrimaryKey: false;
173
+ isAutoincrement: false;
174
+ hasRuntimeDefault: false;
175
+ enumValues: undefined;
176
+ identity: undefined;
177
+ generated: undefined;
178
+ }>;
179
+ owner_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_clients", import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, {
180
+ name: string;
181
+ tableName: "auth_api_clients";
182
+ dataType: "string";
183
+ data: string;
184
+ driverParam: string;
185
+ notNull: false;
186
+ hasDefault: false;
187
+ isPrimaryKey: false;
188
+ isAutoincrement: false;
189
+ hasRuntimeDefault: false;
190
+ enumValues: undefined;
191
+ identity: undefined;
192
+ generated: undefined;
193
+ }>;
194
+ scopes: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_clients", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").SetDimensions<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, 1>>, {
195
+ name: string;
196
+ tableName: "auth_api_clients";
197
+ dataType: "string";
198
+ data: string[];
199
+ driverParam: string | string[];
200
+ notNull: true;
201
+ hasDefault: false;
202
+ isPrimaryKey: false;
203
+ isAutoincrement: false;
204
+ hasRuntimeDefault: false;
205
+ enumValues: undefined;
206
+ identity: undefined;
207
+ generated: undefined;
208
+ }>;
209
+ };
210
+ dialect: "pg";
211
+ }>;
212
+ export declare const apiKeysTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
213
+ name: "auth_api_keys";
214
+ schema: undefined;
215
+ columns: {
216
+ created_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
217
+ name: string;
218
+ tableName: "auth_api_keys";
219
+ dataType: "number int53";
220
+ data: number;
221
+ driverParam: string | number;
222
+ notNull: true;
223
+ hasDefault: false;
224
+ isPrimaryKey: false;
225
+ isAutoincrement: false;
226
+ hasRuntimeDefault: false;
227
+ enumValues: undefined;
228
+ identity: undefined;
229
+ generated: undefined;
230
+ }>;
231
+ expires_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").PgBigInt53Builder, {
232
+ name: string;
233
+ tableName: "auth_api_keys";
234
+ dataType: "number int53";
235
+ data: number;
236
+ driverParam: string | number;
237
+ notNull: false;
238
+ hasDefault: false;
239
+ isPrimaryKey: false;
240
+ isAutoincrement: false;
241
+ hasRuntimeDefault: false;
242
+ enumValues: undefined;
243
+ identity: undefined;
244
+ generated: undefined;
245
+ }>;
246
+ hashed_key: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
247
+ name: string;
248
+ tableName: "auth_api_keys";
249
+ dataType: "string";
250
+ data: string;
251
+ driverParam: string;
252
+ notNull: true;
253
+ hasDefault: false;
254
+ isPrimaryKey: false;
255
+ isAutoincrement: false;
256
+ hasRuntimeDefault: false;
257
+ enumValues: undefined;
258
+ identity: undefined;
259
+ generated: undefined;
260
+ }>;
261
+ key_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
262
+ name: string;
263
+ tableName: "auth_api_keys";
264
+ dataType: "string";
265
+ data: string;
266
+ driverParam: string;
267
+ notNull: true;
268
+ hasDefault: false;
269
+ isPrimaryKey: false;
270
+ isAutoincrement: false;
271
+ hasRuntimeDefault: false;
272
+ enumValues: undefined;
273
+ identity: undefined;
274
+ generated: undefined;
275
+ }>;
276
+ last_used_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").PgBigInt53Builder, {
277
+ name: string;
278
+ tableName: "auth_api_keys";
279
+ dataType: "number int53";
280
+ data: number;
281
+ driverParam: string | number;
282
+ notNull: false;
283
+ hasDefault: false;
284
+ isPrimaryKey: false;
285
+ isAutoincrement: false;
286
+ hasRuntimeDefault: false;
287
+ enumValues: undefined;
288
+ identity: undefined;
289
+ generated: undefined;
290
+ }>;
291
+ name: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
292
+ name: string;
293
+ tableName: "auth_api_keys";
294
+ dataType: "string";
295
+ data: string;
296
+ driverParam: string;
297
+ notNull: true;
298
+ hasDefault: false;
299
+ isPrimaryKey: false;
300
+ isAutoincrement: false;
301
+ hasRuntimeDefault: false;
302
+ enumValues: undefined;
303
+ identity: undefined;
304
+ generated: undefined;
305
+ }>;
306
+ owner_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, {
307
+ name: string;
308
+ tableName: "auth_api_keys";
309
+ dataType: "string";
310
+ data: string;
311
+ driverParam: string;
312
+ notNull: false;
313
+ hasDefault: false;
314
+ isPrimaryKey: false;
315
+ isAutoincrement: false;
316
+ hasRuntimeDefault: false;
317
+ enumValues: undefined;
318
+ identity: undefined;
319
+ generated: undefined;
320
+ }>;
321
+ prefix: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
322
+ name: string;
323
+ tableName: "auth_api_keys";
324
+ dataType: "string";
325
+ data: string;
326
+ driverParam: string;
327
+ notNull: true;
328
+ hasDefault: false;
329
+ isPrimaryKey: false;
330
+ isAutoincrement: false;
331
+ hasRuntimeDefault: false;
332
+ enumValues: undefined;
333
+ identity: undefined;
334
+ generated: undefined;
335
+ }>;
336
+ scopes: import("drizzle-orm/pg-core").PgBuildColumn<"auth_api_keys", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").SetDimensions<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, 1>>, {
337
+ name: string;
338
+ tableName: "auth_api_keys";
339
+ dataType: "string";
340
+ data: string[];
341
+ driverParam: string | string[];
342
+ notNull: true;
343
+ hasDefault: false;
344
+ isPrimaryKey: false;
345
+ isAutoincrement: false;
346
+ hasRuntimeDefault: false;
347
+ enumValues: undefined;
348
+ identity: undefined;
349
+ generated: undefined;
350
+ }>;
351
+ };
352
+ dialect: "pg";
353
+ }>;
354
+ export declare const createNeonAccessTokenStore: (databaseUrl: string) => AccessTokenStore;
355
+ export declare const createNeonApiClientStore: (databaseUrl: string) => ApiClientStore;
356
+ export declare const createNeonApiKeyStore: (databaseUrl: string) => ApiKeyStore;
357
+ export declare const createPostgresAccessTokenStore: <DB extends AnyPgDatabase>(db: DB) => AccessTokenStore;
358
+ export declare const createPostgresApiClientStore: <DB extends AnyPgDatabase>(db: DB) => ApiClientStore;
359
+ export declare const createPostgresApiKeyStore: <DB extends AnyPgDatabase>(db: DB) => ApiKeyStore;
@@ -0,0 +1,2 @@
1
+ import type { AuditEvent } from './types';
2
+ export declare const exportAuditCsv: (events: AuditEvent[]) => string;
@@ -0,0 +1,2 @@
1
+ import type { AuditSink } from './types';
2
+ export declare const createInMemoryAuditSink: () => AuditSink;
@@ -0,0 +1,19 @@
1
+ import type { AuditEvent, AuditSink } from './types';
2
+ export type AuditIntegrity = {
3
+ hash: string;
4
+ previousHash: string;
5
+ writerId?: string;
6
+ };
7
+ export type AuditChainResult = {
8
+ brokenAt?: number;
9
+ ok: boolean;
10
+ };
11
+ export declare const createTamperEvidentSink: ({ loadWriterHead, secret, seedScanLimit, sink, writerId }: {
12
+ loadWriterHead?: (writerId: string) => Promise<string | undefined> | string | undefined;
13
+ secret?: string;
14
+ seedScanLimit?: number;
15
+ sink: AuditSink;
16
+ writerId?: string;
17
+ }) => AuditSink;
18
+ export declare const hashAuditEvent: (event: AuditEvent, previousHash: string, secret?: string) => Promise<string>;
19
+ export declare const verifyAuditChain: (events: AuditEvent[], secret?: string) => Promise<AuditChainResult>;
@@ -0,0 +1,116 @@
1
+ import { type AnyPgDatabase } from '../stores/postgres';
2
+ import { type AuditSink } from './types';
3
+ export declare const auditEventsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
4
+ name: "auth_audit_events";
5
+ schema: undefined;
6
+ columns: {
7
+ at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_audit_events", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
8
+ name: string;
9
+ tableName: "auth_audit_events";
10
+ dataType: "number int53";
11
+ data: number;
12
+ driverParam: string | number;
13
+ notNull: true;
14
+ hasDefault: false;
15
+ isPrimaryKey: false;
16
+ isAutoincrement: false;
17
+ hasRuntimeDefault: false;
18
+ enumValues: undefined;
19
+ identity: undefined;
20
+ generated: undefined;
21
+ }>;
22
+ id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_audit_events", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
23
+ name: string;
24
+ tableName: "auth_audit_events";
25
+ dataType: "string";
26
+ data: string;
27
+ driverParam: string;
28
+ notNull: true;
29
+ hasDefault: false;
30
+ isPrimaryKey: false;
31
+ isAutoincrement: false;
32
+ hasRuntimeDefault: false;
33
+ enumValues: undefined;
34
+ identity: undefined;
35
+ generated: undefined;
36
+ }>;
37
+ ip: import("drizzle-orm/pg-core").PgBuildColumn<"auth_audit_events", import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, {
38
+ name: string;
39
+ tableName: "auth_audit_events";
40
+ dataType: "string";
41
+ data: string;
42
+ driverParam: string;
43
+ notNull: false;
44
+ hasDefault: false;
45
+ isPrimaryKey: false;
46
+ isAutoincrement: false;
47
+ hasRuntimeDefault: false;
48
+ enumValues: undefined;
49
+ identity: undefined;
50
+ generated: undefined;
51
+ }>;
52
+ metadata_json: import("drizzle-orm/pg-core").PgBuildColumn<"auth_audit_events", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgJsonbBuilder, Record<string, unknown>>, {
53
+ name: string;
54
+ tableName: "auth_audit_events";
55
+ dataType: "object json";
56
+ data: Record<string, unknown>;
57
+ driverParam: unknown;
58
+ notNull: false;
59
+ hasDefault: false;
60
+ isPrimaryKey: false;
61
+ isAutoincrement: false;
62
+ hasRuntimeDefault: false;
63
+ enumValues: undefined;
64
+ identity: undefined;
65
+ generated: undefined;
66
+ }>;
67
+ organization_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_audit_events", import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, {
68
+ name: string;
69
+ tableName: "auth_audit_events";
70
+ dataType: "string";
71
+ data: string;
72
+ driverParam: string;
73
+ notNull: false;
74
+ hasDefault: false;
75
+ isPrimaryKey: false;
76
+ isAutoincrement: false;
77
+ hasRuntimeDefault: false;
78
+ enumValues: undefined;
79
+ identity: undefined;
80
+ generated: undefined;
81
+ }>;
82
+ type: import("drizzle-orm/pg-core").PgBuildColumn<"auth_audit_events", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
83
+ name: string;
84
+ tableName: "auth_audit_events";
85
+ dataType: "string";
86
+ data: string;
87
+ driverParam: string;
88
+ notNull: true;
89
+ hasDefault: false;
90
+ isPrimaryKey: false;
91
+ isAutoincrement: false;
92
+ hasRuntimeDefault: false;
93
+ enumValues: undefined;
94
+ identity: undefined;
95
+ generated: undefined;
96
+ }>;
97
+ user_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_audit_events", import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, {
98
+ name: string;
99
+ tableName: "auth_audit_events";
100
+ dataType: "string";
101
+ data: string;
102
+ driverParam: string;
103
+ notNull: false;
104
+ hasDefault: false;
105
+ isPrimaryKey: false;
106
+ isAutoincrement: false;
107
+ hasRuntimeDefault: false;
108
+ enumValues: undefined;
109
+ identity: undefined;
110
+ generated: undefined;
111
+ }>;
112
+ };
113
+ dialect: "pg";
114
+ }>;
115
+ export declare const createNeonAuditSink: (databaseUrl: string) => AuditSink;
116
+ export declare const createPostgresAuditSink: <DB extends AnyPgDatabase>(db: DB) => AuditSink;
@@ -0,0 +1,11 @@
1
+ import type { AuditSink } from './types';
2
+ export type SiemFormat = 'datadog' | 'generic' | 'splunk';
3
+ export type SiemEndpoint = {
4
+ format?: SiemFormat;
5
+ headers?: Record<string, string>;
6
+ token?: string;
7
+ url: string;
8
+ };
9
+ export declare const createSiemLogStream: ({ endpoints }: {
10
+ endpoints: SiemEndpoint[];
11
+ }) => AuditSink;
@@ -0,0 +1,2 @@
1
+ import { type Importer } from './types';
2
+ export declare const auth0Importer: Importer;
@@ -0,0 +1,2 @@
1
+ import { type Importer } from './types';
2
+ export declare const clerkImporter: Importer;
@@ -0,0 +1,10 @@
1
+ import type { ImportResult, Importer } from './types';
2
+ export declare const importers: Record<string, Importer>;
3
+ export type ImportOptions = {
4
+ commit: boolean;
5
+ databaseUrl: string;
6
+ };
7
+ export declare const runImport: (result: ImportResult, options: ImportOptions) => Promise<{
8
+ identityCount: number;
9
+ userCount: number;
10
+ }>;
@@ -0,0 +1,2 @@
1
+ import { type Importer } from './types';
2
+ export declare const luciaImporter: Importer;
@@ -0,0 +1,2 @@
1
+ import { type Importer } from './types';
2
+ export declare const nextauthImporter: Importer;
@@ -0,0 +1,2 @@
1
+ import type { Importer } from './types';
2
+ export declare const supabaseImporter: Importer;
@@ -0,0 +1,27 @@
1
+ export declare const detectPasswordHashAlgorithm: (hash?: string) => ImportedUser['passwordHashAlgo'];
2
+ export type ImportedUser = {
3
+ createdAtMs: number;
4
+ email: string;
5
+ emailVerified: boolean;
6
+ externalId: string;
7
+ familyName?: string;
8
+ givenName?: string;
9
+ passwordHash?: string;
10
+ passwordHashAlgo?: 'argon2id' | 'bcrypt' | 'scrypt' | 'pbkdf2';
11
+ };
12
+ export type ImportedIdentity = {
13
+ authProvider: string;
14
+ createdAtMs: number;
15
+ metadata?: Record<string, unknown>;
16
+ providerSubject: string;
17
+ userExternalId: string;
18
+ };
19
+ export type ImportResult = {
20
+ identities: ImportedIdentity[];
21
+ source: string;
22
+ users: ImportedUser[];
23
+ };
24
+ export type Importer = {
25
+ parse: (path: string) => Promise<ImportResult>;
26
+ source: string;
27
+ };
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ export {};
@@ -0,0 +1,32 @@
1
+ import { type FormEvent } from 'react';
2
+ import type { AuthClient, AuthClientError } from '../../createAuthClient';
3
+ type AuthnSuccess = {
4
+ passwordCompromised?: boolean;
5
+ status: 'authenticated' | 'mfa_required';
6
+ };
7
+ export type SignInProps = {
8
+ client: AuthClient;
9
+ classNames?: {
10
+ button?: string;
11
+ container?: string;
12
+ divider?: string;
13
+ error?: string;
14
+ field?: string;
15
+ input?: string;
16
+ label?: string;
17
+ oauthButton?: string;
18
+ oauthGrid?: string;
19
+ };
20
+ emailLabel?: string;
21
+ onError?: (error: AuthClientError) => void;
22
+ onSuccess?: (result: AuthnSuccess) => void;
23
+ passwordLabel?: string;
24
+ providers?: string[];
25
+ submitLabel?: string;
26
+ };
27
+ export declare const SignIn: ({ client, classNames, emailLabel, onError, onSuccess, passwordLabel, providers, submitLabel }: SignInProps) => import("react").ReactElement<{
28
+ className: string | undefined;
29
+ 'data-abs-auth': string;
30
+ onSubmit: (event: FormEvent<HTMLFormElement>) => Promise<void>;
31
+ }, string | import("react").JSXElementConstructor<any>>;
32
+ export {};