@absolutejs/auth 0.56.8 → 0.56.9
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/dist/agents/index.js +1459 -737
- package/dist/agents/index.js.map +31 -31
- package/dist/agents/postgresStores.d.ts +30 -10
- package/dist/cli/migrate.js +48 -43
- package/dist/cli/migrate.js.map +3 -3
- package/dist/index.js +1459 -737
- package/dist/index.js.map +31 -31
- package/dist/oidc/index.js +1449 -732
- package/dist/oidc/index.js.map +30 -30
- package/dist/server.js +1459 -737
- package/dist/server.js.map +31 -31
- package/dist/vault/index.js +1449 -732
- package/dist/vault/index.js.map +30 -30
- package/package.json +2 -2
|
@@ -19,10 +19,14 @@ export declare const agentDelegationsTable: import("drizzle-orm/pg-core").PgTabl
|
|
|
19
19
|
identity: undefined;
|
|
20
20
|
generated: undefined;
|
|
21
21
|
}>;
|
|
22
|
-
authorization_details: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_delegations", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").
|
|
22
|
+
authorization_details: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_delegations", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgCustomColumnBuilder<{
|
|
23
|
+
dataType: "custom";
|
|
24
|
+
data: unknown;
|
|
25
|
+
driverParam: unknown;
|
|
26
|
+
}>, Record<string, unknown>[]>, {
|
|
23
27
|
name: string;
|
|
24
28
|
tableName: "auth_agent_delegations";
|
|
25
|
-
dataType: "
|
|
29
|
+
dataType: "custom";
|
|
26
30
|
data: Record<string, unknown>[];
|
|
27
31
|
driverParam: unknown;
|
|
28
32
|
notNull: false;
|
|
@@ -94,10 +98,14 @@ export declare const agentDelegationsTable: import("drizzle-orm/pg-core").PgTabl
|
|
|
94
98
|
identity: undefined;
|
|
95
99
|
generated: undefined;
|
|
96
100
|
}>;
|
|
97
|
-
scopes: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_delegations", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").
|
|
101
|
+
scopes: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_delegations", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgCustomColumnBuilder<{
|
|
102
|
+
dataType: "custom";
|
|
103
|
+
data: unknown;
|
|
104
|
+
driverParam: unknown;
|
|
105
|
+
}>, string[]>>>, {
|
|
98
106
|
name: string;
|
|
99
107
|
tableName: "auth_agent_delegations";
|
|
100
|
-
dataType: "
|
|
108
|
+
dataType: "custom";
|
|
101
109
|
data: string[];
|
|
102
110
|
driverParam: unknown;
|
|
103
111
|
notNull: true;
|
|
@@ -176,10 +184,14 @@ export declare const agentIdentityRegistrationsTable: import("drizzle-orm/pg-cor
|
|
|
176
184
|
identity: undefined;
|
|
177
185
|
generated: undefined;
|
|
178
186
|
}>;
|
|
179
|
-
claim_attempt: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_identity_registrations", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").
|
|
187
|
+
claim_attempt: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_identity_registrations", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgCustomColumnBuilder<{
|
|
188
|
+
dataType: "custom";
|
|
189
|
+
data: unknown;
|
|
190
|
+
driverParam: unknown;
|
|
191
|
+
}>, import("./types").AgentClaimAttempt | undefined>, {
|
|
180
192
|
name: string;
|
|
181
193
|
tableName: "auth_agent_identity_registrations";
|
|
182
|
-
dataType: "
|
|
194
|
+
dataType: "custom";
|
|
183
195
|
data: import("./types").AgentClaimAttempt | undefined;
|
|
184
196
|
driverParam: unknown;
|
|
185
197
|
notNull: false;
|
|
@@ -453,10 +465,14 @@ export declare const agentRegistrationsTable: import("drizzle-orm/pg-core").PgTa
|
|
|
453
465
|
identity: undefined;
|
|
454
466
|
generated: undefined;
|
|
455
467
|
}>;
|
|
456
|
-
allowed_scopes: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_registrations", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").
|
|
468
|
+
allowed_scopes: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_registrations", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgCustomColumnBuilder<{
|
|
469
|
+
dataType: "custom";
|
|
470
|
+
data: unknown;
|
|
471
|
+
driverParam: unknown;
|
|
472
|
+
}>, string[]>>>, {
|
|
457
473
|
name: string;
|
|
458
474
|
tableName: "auth_agent_registrations";
|
|
459
|
-
dataType: "
|
|
475
|
+
dataType: "custom";
|
|
460
476
|
data: string[];
|
|
461
477
|
driverParam: unknown;
|
|
462
478
|
notNull: true;
|
|
@@ -498,10 +514,14 @@ export declare const agentRegistrationsTable: import("drizzle-orm/pg-core").PgTa
|
|
|
498
514
|
identity: undefined;
|
|
499
515
|
generated: undefined;
|
|
500
516
|
}>;
|
|
501
|
-
metadata: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_registrations", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").
|
|
517
|
+
metadata: import("drizzle-orm/pg-core").PgBuildColumn<"auth_agent_registrations", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgCustomColumnBuilder<{
|
|
518
|
+
dataType: "custom";
|
|
519
|
+
data: unknown;
|
|
520
|
+
driverParam: unknown;
|
|
521
|
+
}>, Record<string, unknown>>, {
|
|
502
522
|
name: string;
|
|
503
523
|
tableName: "auth_agent_registrations";
|
|
504
|
-
dataType: "
|
|
524
|
+
dataType: "custom";
|
|
505
525
|
data: Record<string, unknown>;
|
|
506
526
|
driverParam: unknown;
|
|
507
527
|
notNull: false;
|
package/dist/cli/migrate.js
CHANGED
|
@@ -343,8 +343,8 @@ var apiKeysTable = pgTable2("auth_api_keys", {
|
|
|
343
343
|
import { and as and2, desc as desc3, eq as eq3, gt, isNull, or } from "drizzle-orm";
|
|
344
344
|
import {
|
|
345
345
|
bigint as bigint3,
|
|
346
|
+
customType,
|
|
346
347
|
integer,
|
|
347
|
-
jsonb,
|
|
348
348
|
pgTable as pgTable3,
|
|
349
349
|
uniqueIndex,
|
|
350
350
|
varchar as varchar3
|
|
@@ -352,23 +352,28 @@ import {
|
|
|
352
352
|
var ID_LENGTH3 = 255;
|
|
353
353
|
var NAME_LENGTH = 255;
|
|
354
354
|
var STATUS_LENGTH = 16;
|
|
355
|
+
var portableJsonb = customType({
|
|
356
|
+
dataType: () => "jsonb",
|
|
357
|
+
fromDriver: (value) => typeof value === "string" ? JSON.parse(value) : value,
|
|
358
|
+
toDriver: (value) => JSON.stringify(value)
|
|
359
|
+
});
|
|
355
360
|
var agentDelegationsTable = pgTable3("auth_agent_delegations", {
|
|
356
361
|
agent_id: varchar3("agent_id", { length: ID_LENGTH3 }).notNull(),
|
|
357
|
-
authorization_details:
|
|
362
|
+
authorization_details: portableJsonb("authorization_details").$type(),
|
|
358
363
|
created_at_ms: bigint3("created_at_ms", { mode: "number" }).notNull(),
|
|
359
364
|
delegation_id: varchar3("delegation_id", {
|
|
360
365
|
length: ID_LENGTH3
|
|
361
366
|
}).primaryKey(),
|
|
362
367
|
expires_at_ms: bigint3("expires_at_ms", { mode: "number" }),
|
|
363
368
|
organization_id: varchar3("organization_id", { length: ID_LENGTH3 }),
|
|
364
|
-
scopes:
|
|
369
|
+
scopes: portableJsonb("scopes").$type().notNull().default([]),
|
|
365
370
|
status: varchar3("status", { length: STATUS_LENGTH }).$type().notNull(),
|
|
366
371
|
updated_at_ms: bigint3("updated_at_ms", { mode: "number" }).notNull(),
|
|
367
372
|
user_id: varchar3("user_id", { length: ID_LENGTH3 }).notNull()
|
|
368
373
|
});
|
|
369
374
|
var agentIdentityRegistrationsTable = pgTable3("auth_agent_identity_registrations", {
|
|
370
375
|
agent_id: varchar3("agent_id", { length: ID_LENGTH3 }).notNull().unique(),
|
|
371
|
-
claim_attempt:
|
|
376
|
+
claim_attempt: portableJsonb("claim_attempt").$type(),
|
|
372
377
|
claim_attempt_token_hash: varchar3("claim_attempt_token_hash", {
|
|
373
378
|
length: ID_LENGTH3
|
|
374
379
|
}).unique(),
|
|
@@ -400,10 +405,10 @@ var agentIdentityRegistrationsTable = pgTable3("auth_agent_identity_registration
|
|
|
400
405
|
]);
|
|
401
406
|
var agentRegistrationsTable = pgTable3("auth_agent_registrations", {
|
|
402
407
|
agent_id: varchar3("agent_id", { length: ID_LENGTH3 }).primaryKey(),
|
|
403
|
-
allowed_scopes:
|
|
408
|
+
allowed_scopes: portableJsonb("allowed_scopes").$type().notNull().default([]),
|
|
404
409
|
client_id: varchar3("client_id", { length: ID_LENGTH3 }).unique(),
|
|
405
410
|
created_at_ms: bigint3("created_at_ms", { mode: "number" }).notNull(),
|
|
406
|
-
metadata:
|
|
411
|
+
metadata: portableJsonb("metadata").$type(),
|
|
407
412
|
name: varchar3("name", { length: NAME_LENGTH }).notNull(),
|
|
408
413
|
status: varchar3("status", { length: STATUS_LENGTH }).$type().notNull(),
|
|
409
414
|
updated_at_ms: bigint3("updated_at_ms", { mode: "number" }).notNull()
|
|
@@ -411,7 +416,7 @@ var agentRegistrationsTable = pgTable3("auth_agent_registrations", {
|
|
|
411
416
|
|
|
412
417
|
// src/audit/postgresAuditStore.ts
|
|
413
418
|
import { desc as desc4, eq as eq4, lt as lt2 } from "drizzle-orm";
|
|
414
|
-
import { bigint as bigint4, jsonb
|
|
419
|
+
import { bigint as bigint4, jsonb, pgTable as pgTable4, varchar as varchar4 } from "drizzle-orm/pg-core";
|
|
415
420
|
var ID_LENGTH4 = 255;
|
|
416
421
|
var IP_LENGTH = 64;
|
|
417
422
|
var TYPE_LENGTH = 64;
|
|
@@ -419,7 +424,7 @@ var auditEventsTable = pgTable4("auth_audit_events", {
|
|
|
419
424
|
at_ms: bigint4("at_ms", { mode: "number" }).notNull(),
|
|
420
425
|
id: varchar4("id", { length: ID_LENGTH4 }).primaryKey(),
|
|
421
426
|
ip: varchar4("ip", { length: IP_LENGTH }),
|
|
422
|
-
metadata_json:
|
|
427
|
+
metadata_json: jsonb("metadata_json").$type(),
|
|
423
428
|
organization_id: varchar4("organization_id", { length: ID_LENGTH4 }),
|
|
424
429
|
type: varchar4("type", { length: TYPE_LENGTH }).notNull(),
|
|
425
430
|
user_id: varchar4("user_id", { length: ID_LENGTH4 })
|
|
@@ -470,7 +475,7 @@ var warrantsTable = pgTable6("auth_fga_warrants", {
|
|
|
470
475
|
import { neon as neon3 } from "@neondatabase/serverless";
|
|
471
476
|
import { desc as desc5, eq as eq7 } from "drizzle-orm";
|
|
472
477
|
import { drizzle as drizzle2 } from "drizzle-orm/neon-http";
|
|
473
|
-
import { jsonb as
|
|
478
|
+
import { jsonb as jsonb2, pgTable as pgTable7, text as text3, timestamp, varchar as varchar7 } from "drizzle-orm/pg-core";
|
|
474
479
|
|
|
475
480
|
// node_modules/citra/dist/index.js
|
|
476
481
|
var NUM_GENERATOR_BYTES = 32;
|
|
@@ -2523,8 +2528,8 @@ var scopeRequiredProviderOptions = Object.keys(providers).filter(isScopeRequired
|
|
|
2523
2528
|
|
|
2524
2529
|
// src/linkedProviders/neonStores.ts
|
|
2525
2530
|
var linkedProviderBindingsTable = pgTable7("linked_provider_bindings", {
|
|
2526
|
-
available_scopes:
|
|
2527
|
-
capabilities:
|
|
2531
|
+
available_scopes: jsonb2("available_scopes").$type().notNull().default([]),
|
|
2532
|
+
capabilities: jsonb2("capabilities").$type().default([]),
|
|
2528
2533
|
connector_provider: varchar7("connector_provider", { length: 64 }).notNull(),
|
|
2529
2534
|
created_at: timestamp("created_at").notNull().defaultNow(),
|
|
2530
2535
|
email: varchar7("email", { length: 320 }),
|
|
@@ -2537,7 +2542,7 @@ var linkedProviderBindingsTable = pgTable7("linked_provider_bindings", {
|
|
|
2537
2542
|
grant_id: varchar7("grant_id", { length: 255 }).notNull(),
|
|
2538
2543
|
id: varchar7("id", { length: 255 }).primaryKey(),
|
|
2539
2544
|
label: varchar7("label", { length: 255 }),
|
|
2540
|
-
metadata:
|
|
2545
|
+
metadata: jsonb2("metadata").$type().default({}),
|
|
2541
2546
|
status: varchar7("status", { length: 64 }).$type().notNull(),
|
|
2542
2547
|
updated_at: timestamp("updated_at").notNull().defaultNow(),
|
|
2543
2548
|
username: varchar7("username", { length: 255 })
|
|
@@ -2547,11 +2552,11 @@ var linkedProviderGrantsTable = pgTable7("linked_provider_grants", {
|
|
|
2547
2552
|
auth_provider_key: varchar7("auth_provider_key", { length: 64 }).notNull(),
|
|
2548
2553
|
created_at: timestamp("created_at").notNull().defaultNow(),
|
|
2549
2554
|
expires_at: timestamp("expires_at"),
|
|
2550
|
-
granted_scopes:
|
|
2555
|
+
granted_scopes: jsonb2("granted_scopes").$type().notNull().default([]),
|
|
2551
2556
|
id: varchar7("id", { length: 255 }).primaryKey(),
|
|
2552
2557
|
last_refresh_error: text3("last_refresh_error"),
|
|
2553
2558
|
last_refreshed_at: timestamp("last_refreshed_at"),
|
|
2554
|
-
metadata:
|
|
2559
|
+
metadata: jsonb2("metadata").$type().default({}),
|
|
2555
2560
|
owner_ref: varchar7("owner_ref", { length: 255 }).notNull(),
|
|
2556
2561
|
provider_family: varchar7("provider_family", { length: 64 }).notNull(),
|
|
2557
2562
|
provider_subject: varchar7("provider_subject", { length: 255 }).notNull(),
|
|
@@ -2579,7 +2584,7 @@ import { eq as eq9 } from "drizzle-orm";
|
|
|
2579
2584
|
import {
|
|
2580
2585
|
bigint as bigint7,
|
|
2581
2586
|
boolean as boolean3,
|
|
2582
|
-
jsonb as
|
|
2587
|
+
jsonb as jsonb3,
|
|
2583
2588
|
pgTable as pgTable9,
|
|
2584
2589
|
smallint,
|
|
2585
2590
|
text as text4,
|
|
@@ -2588,7 +2593,7 @@ import {
|
|
|
2588
2593
|
var ID_LENGTH7 = 255;
|
|
2589
2594
|
var PHONE_LENGTH = 20;
|
|
2590
2595
|
var mfaEnrollmentsTable = pgTable9("auth_mfa_enrollments", {
|
|
2591
|
-
backup_code_hashes:
|
|
2596
|
+
backup_code_hashes: jsonb3("backup_code_hashes").$type().notNull().default([]),
|
|
2592
2597
|
created_at_ms: bigint7("created_at_ms", { mode: "number" }).notNull(),
|
|
2593
2598
|
last_used_at_ms: bigint7("last_used_at_ms", { mode: "number" }),
|
|
2594
2599
|
sms_failed_attempts: smallint("sms_failed_attempts").notNull().default(0),
|
|
@@ -2610,7 +2615,7 @@ import { and as and4, desc as desc6, eq as eq10, gt as gt2, lt as lt3 } from "dr
|
|
|
2610
2615
|
import {
|
|
2611
2616
|
bigint as bigint8,
|
|
2612
2617
|
boolean as boolean4,
|
|
2613
|
-
jsonb as
|
|
2618
|
+
jsonb as jsonb4,
|
|
2614
2619
|
pgTable as pgTable10,
|
|
2615
2620
|
text as text5,
|
|
2616
2621
|
varchar as varchar10
|
|
@@ -2660,7 +2665,7 @@ var oauthClientsTable = pgTable10("auth_oauth_clients", {
|
|
|
2660
2665
|
}),
|
|
2661
2666
|
client_id: varchar10("client_id", { length: ID_LENGTH8 }).primaryKey(),
|
|
2662
2667
|
hashed_secret: varchar10("hashed_secret", { length: ID_LENGTH8 }),
|
|
2663
|
-
jwks_json:
|
|
2668
|
+
jwks_json: jsonb4("jwks_json").$type(),
|
|
2664
2669
|
jwks_uri: varchar10("jwks_uri", { length: URL_LENGTH }),
|
|
2665
2670
|
name: varchar10("name", { length: ID_LENGTH8 }).notNull(),
|
|
2666
2671
|
post_logout_redirect_uris: text5("post_logout_redirect_uris").array(),
|
|
@@ -2672,7 +2677,7 @@ var oauthClientsTable = pgTable10("auth_oauth_clients", {
|
|
|
2672
2677
|
var oauthCodesTable = pgTable10("auth_oauth_codes", {
|
|
2673
2678
|
acr: varchar10("acr", { length: ID_LENGTH8 }),
|
|
2674
2679
|
audience: varchar10("audience", { length: URL_LENGTH }),
|
|
2675
|
-
claims_json:
|
|
2680
|
+
claims_json: jsonb4("claims_json").$type(),
|
|
2676
2681
|
client_id: varchar10("client_id", { length: ID_LENGTH8 }).notNull(),
|
|
2677
2682
|
code_challenge: varchar10("code_challenge", { length: ID_LENGTH8 }).notNull(),
|
|
2678
2683
|
code_hash: varchar10("code_hash", { length: ID_LENGTH8 }).primaryKey(),
|
|
@@ -2717,7 +2722,7 @@ var oauthPushedAuthorizationRequestsTable = pgTable10("auth_oauth_pushed_authori
|
|
|
2717
2722
|
client_id: varchar10("client_id", { length: ID_LENGTH8 }).notNull(),
|
|
2718
2723
|
created_at_ms: bigint8("created_at_ms", { mode: "number" }).notNull(),
|
|
2719
2724
|
expires_at_ms: bigint8("expires_at_ms", { mode: "number" }).notNull(),
|
|
2720
|
-
params_json:
|
|
2725
|
+
params_json: jsonb4("params_json").$type().notNull(),
|
|
2721
2726
|
request_uri_hash: varchar10("request_uri_hash", {
|
|
2722
2727
|
length: ID_LENGTH8
|
|
2723
2728
|
}).primaryKey()
|
|
@@ -2725,7 +2730,7 @@ var oauthPushedAuthorizationRequestsTable = pgTable10("auth_oauth_pushed_authori
|
|
|
2725
2730
|
var oauthRefreshTokensTable = pgTable10("auth_oauth_refresh_tokens", {
|
|
2726
2731
|
acr: varchar10("acr", { length: ID_LENGTH8 }),
|
|
2727
2732
|
audience: varchar10("audience", { length: URL_LENGTH }),
|
|
2728
|
-
claims_json:
|
|
2733
|
+
claims_json: jsonb4("claims_json").$type(),
|
|
2729
2734
|
client_id: varchar10("client_id", { length: ID_LENGTH8 }).notNull(),
|
|
2730
2735
|
created_at_ms: bigint8("created_at_ms", { mode: "number" }).notNull(),
|
|
2731
2736
|
dpop_jkt: varchar10("dpop_jkt", { length: ID_LENGTH8 }),
|
|
@@ -2739,7 +2744,7 @@ var oauthRefreshTokensTable = pgTable10("auth_oauth_refresh_tokens", {
|
|
|
2739
2744
|
import { and as and5, desc as desc7, eq as eq11 } from "drizzle-orm";
|
|
2740
2745
|
import {
|
|
2741
2746
|
bigint as bigint9,
|
|
2742
|
-
jsonb as
|
|
2747
|
+
jsonb as jsonb5,
|
|
2743
2748
|
pgTable as pgTable11,
|
|
2744
2749
|
primaryKey as primaryKey2,
|
|
2745
2750
|
varchar as varchar11
|
|
@@ -2759,7 +2764,7 @@ var organizationInvitationsTable = pgTable11("auth_organization_invitations", {
|
|
|
2759
2764
|
organization_id: varchar11("organization_id", {
|
|
2760
2765
|
length: ID_LENGTH9
|
|
2761
2766
|
}).notNull(),
|
|
2762
|
-
roles:
|
|
2767
|
+
roles: jsonb5("roles").$type().notNull().default([]),
|
|
2763
2768
|
state: varchar11("state", { length: STATE_LENGTH }).$type().notNull().default("pending"),
|
|
2764
2769
|
token_hash: varchar11("token_hash", { length: ID_LENGTH9 }).notNull().unique()
|
|
2765
2770
|
});
|
|
@@ -2768,14 +2773,14 @@ var organizationMembershipsTable = pgTable11("auth_organization_memberships", {
|
|
|
2768
2773
|
organization_id: varchar11("organization_id", {
|
|
2769
2774
|
length: ID_LENGTH9
|
|
2770
2775
|
}).notNull(),
|
|
2771
|
-
roles:
|
|
2776
|
+
roles: jsonb5("roles").$type().notNull().default([]),
|
|
2772
2777
|
status: varchar11("status", { length: STATE_LENGTH }).$type().notNull().default("active"),
|
|
2773
2778
|
updated_at_ms: bigint9("updated_at_ms", { mode: "number" }).notNull(),
|
|
2774
2779
|
user_id: varchar11("user_id", { length: ID_LENGTH9 }).notNull()
|
|
2775
2780
|
}, (table) => [primaryKey2({ columns: [table.organization_id, table.user_id] })]);
|
|
2776
2781
|
var organizationsTable = pgTable11("auth_organizations", {
|
|
2777
2782
|
created_at_ms: bigint9("created_at_ms", { mode: "number" }).notNull(),
|
|
2778
|
-
metadata:
|
|
2783
|
+
metadata: jsonb5("metadata").$type(),
|
|
2779
2784
|
name: varchar11("name", { length: NAME_LENGTH2 }).notNull(),
|
|
2780
2785
|
organization_id: varchar11("organization_id", {
|
|
2781
2786
|
length: ID_LENGTH9
|
|
@@ -2795,10 +2800,10 @@ var passwordlessTokensTable = pgTable12("auth_passwordless_tokens", {
|
|
|
2795
2800
|
|
|
2796
2801
|
// src/portal/postgresSetupSessionStore.ts
|
|
2797
2802
|
import { eq as eq13 } from "drizzle-orm";
|
|
2798
|
-
import { bigint as bigint11, jsonb as
|
|
2803
|
+
import { bigint as bigint11, jsonb as jsonb6, pgTable as pgTable13, varchar as varchar13 } from "drizzle-orm/pg-core";
|
|
2799
2804
|
var ID_LENGTH11 = 255;
|
|
2800
2805
|
var setupSessionsTable = pgTable13("auth_setup_sessions", {
|
|
2801
|
-
capabilities:
|
|
2806
|
+
capabilities: jsonb6("capabilities").$type().notNull().default([]),
|
|
2802
2807
|
created_at_ms: bigint11("created_at_ms", { mode: "number" }).notNull(),
|
|
2803
2808
|
created_by: varchar13("created_by", { length: ID_LENGTH11 }),
|
|
2804
2809
|
expires_at_ms: bigint11("expires_at_ms", { mode: "number" }).notNull(),
|
|
@@ -2815,7 +2820,7 @@ var setupSessionsTable = pgTable13("auth_setup_sessions", {
|
|
|
2815
2820
|
import { and as and6, eq as eq14 } from "drizzle-orm";
|
|
2816
2821
|
import {
|
|
2817
2822
|
bigint as bigint12,
|
|
2818
|
-
jsonb as
|
|
2823
|
+
jsonb as jsonb7,
|
|
2819
2824
|
pgTable as pgTable14,
|
|
2820
2825
|
primaryKey as primaryKey3,
|
|
2821
2826
|
varchar as varchar14
|
|
@@ -2826,7 +2831,7 @@ var GLOBAL_SCOPE = "";
|
|
|
2826
2831
|
var rolesTable = pgTable14("auth_roles", {
|
|
2827
2832
|
created_at_ms: bigint12("created_at_ms", { mode: "number" }).notNull(),
|
|
2828
2833
|
organization_id: varchar14("organization_id", { length: ID_LENGTH12 }).notNull().default(GLOBAL_SCOPE),
|
|
2829
|
-
permissions:
|
|
2834
|
+
permissions: jsonb7("permissions").$type().notNull().default([]),
|
|
2830
2835
|
slug: varchar14("slug", { length: SLUG_LENGTH }).notNull(),
|
|
2831
2836
|
updated_at_ms: bigint12("updated_at_ms", { mode: "number" }).notNull()
|
|
2832
2837
|
}, (table) => [primaryKey3({ columns: [table.organization_id, table.slug] })]);
|
|
@@ -2852,7 +2857,7 @@ import { drizzle as drizzle3 } from "drizzle-orm/neon-http";
|
|
|
2852
2857
|
import {
|
|
2853
2858
|
bigint as bigint14,
|
|
2854
2859
|
index,
|
|
2855
|
-
jsonb as
|
|
2860
|
+
jsonb as jsonb8,
|
|
2856
2861
|
pgTable as pgTable16,
|
|
2857
2862
|
text as text6,
|
|
2858
2863
|
timestamp as timestamp2,
|
|
@@ -2866,7 +2871,7 @@ var authSessionsTable = pgTable16("auth_sessions", {
|
|
|
2866
2871
|
id: varchar16("id", { length: 255 }).primaryKey(),
|
|
2867
2872
|
refresh_token: text6("refresh_token"),
|
|
2868
2873
|
updated_at: timestamp2("updated_at").notNull().defaultNow(),
|
|
2869
|
-
user_json:
|
|
2874
|
+
user_json: jsonb8("user_json").$type().notNull()
|
|
2870
2875
|
}, (table) => [index("auth_sessions_expires_at_idx").on(table.expires_at_ms)]);
|
|
2871
2876
|
var authUnregisteredSessionsTable = pgTable16("auth_unregistered_sessions", {
|
|
2872
2877
|
access_token: text6("access_token"),
|
|
@@ -2874,9 +2879,9 @@ var authUnregisteredSessionsTable = pgTable16("auth_unregistered_sessions", {
|
|
|
2874
2879
|
expires_at_ms: bigint14("expires_at_ms", { mode: "number" }).notNull(),
|
|
2875
2880
|
id: varchar16("id", { length: 255 }).primaryKey(),
|
|
2876
2881
|
refresh_token: text6("refresh_token"),
|
|
2877
|
-
session_information_json:
|
|
2882
|
+
session_information_json: jsonb8("session_information_json").$type(),
|
|
2878
2883
|
updated_at: timestamp2("updated_at").notNull().defaultNow(),
|
|
2879
|
-
user_identity_json:
|
|
2884
|
+
user_identity_json: jsonb8("user_identity_json").$type()
|
|
2880
2885
|
}, (table) => [
|
|
2881
2886
|
index("auth_unregistered_sessions_expires_at_idx").on(table.expires_at_ms)
|
|
2882
2887
|
]);
|
|
@@ -2897,11 +2902,11 @@ var samlServiceProvidersTable = pgTable17("auth_saml_service_providers", {
|
|
|
2897
2902
|
|
|
2898
2903
|
// src/sso/postgresSsoConnectionStore.ts
|
|
2899
2904
|
import { and as and7, desc as desc9, eq as eq18 } from "drizzle-orm";
|
|
2900
|
-
import { bigint as bigint16, boolean as boolean5, jsonb as
|
|
2905
|
+
import { bigint as bigint16, boolean as boolean5, jsonb as jsonb9, pgTable as pgTable18, varchar as varchar18 } from "drizzle-orm/pg-core";
|
|
2901
2906
|
var ID_LENGTH15 = 255;
|
|
2902
2907
|
var TYPE_LENGTH2 = 16;
|
|
2903
2908
|
var ssoConnectionsTable = pgTable18("auth_sso_connections", {
|
|
2904
|
-
config:
|
|
2909
|
+
config: jsonb9("config").$type().notNull(),
|
|
2905
2910
|
connection_id: varchar18("connection_id", { length: ID_LENGTH15 }).primaryKey(),
|
|
2906
2911
|
created_at_ms: bigint16("created_at_ms", { mode: "number" }).notNull(),
|
|
2907
2912
|
enabled: boolean5("enabled").notNull().default(true),
|
|
@@ -2914,7 +2919,7 @@ var ssoConnectionsTable = pgTable18("auth_sso_connections", {
|
|
|
2914
2919
|
|
|
2915
2920
|
// src/vc/postgresVcStores.ts
|
|
2916
2921
|
import { eq as eq19 } from "drizzle-orm";
|
|
2917
|
-
import { bigint as bigint17, boolean as boolean6, jsonb as
|
|
2922
|
+
import { bigint as bigint17, boolean as boolean6, jsonb as jsonb10, pgTable as pgTable19, varchar as varchar19 } from "drizzle-orm/pg-core";
|
|
2918
2923
|
var ID_LENGTH16 = 255;
|
|
2919
2924
|
var vcCredentialNoncesTable = pgTable19("auth_vc_credential_nonces", {
|
|
2920
2925
|
expires_at_ms: bigint17("expires_at_ms", { mode: "number" }).notNull(),
|
|
@@ -2936,11 +2941,11 @@ var vcCredentialOffersTable = pgTable19("auth_vc_credential_offers", {
|
|
|
2936
2941
|
var vcPresentationRequestsTable = pgTable19("auth_vc_presentation_requests", {
|
|
2937
2942
|
client_id: varchar19("client_id", { length: ID_LENGTH16 }).notNull(),
|
|
2938
2943
|
created_at_ms: bigint17("created_at_ms", { mode: "number" }).notNull(),
|
|
2939
|
-
expected_issuer_jwk_json:
|
|
2944
|
+
expected_issuer_jwk_json: jsonb10("expected_issuer_jwk_json").$type().notNull(),
|
|
2940
2945
|
expires_at_ms: bigint17("expires_at_ms", { mode: "number" }).notNull(),
|
|
2941
2946
|
nonce: varchar19("nonce", { length: ID_LENGTH16 }).notNull(),
|
|
2942
2947
|
request_id: varchar19("request_id", { length: ID_LENGTH16 }).primaryKey(),
|
|
2943
|
-
requested_claims:
|
|
2948
|
+
requested_claims: jsonb10("requested_claims").$type().notNull(),
|
|
2944
2949
|
response_uri: varchar19("response_uri", { length: ID_LENGTH16 }).notNull(),
|
|
2945
2950
|
state: varchar19("state", { length: ID_LENGTH16 })
|
|
2946
2951
|
});
|
|
@@ -2968,7 +2973,7 @@ import { eq as eq21 } from "drizzle-orm";
|
|
|
2968
2973
|
import {
|
|
2969
2974
|
bigint as bigint19,
|
|
2970
2975
|
boolean as boolean7,
|
|
2971
|
-
jsonb as
|
|
2976
|
+
jsonb as jsonb11,
|
|
2972
2977
|
pgTable as pgTable21,
|
|
2973
2978
|
text as text9,
|
|
2974
2979
|
varchar as varchar21
|
|
@@ -2983,13 +2988,13 @@ var webauthnCredentialsTable = pgTable21("auth_webauthn_credentials", {
|
|
|
2983
2988
|
device_type: varchar21("device_type", { length: DEVICE_TYPE_LENGTH }),
|
|
2984
2989
|
last_used_at_ms: bigint19("last_used_at_ms", { mode: "number" }),
|
|
2985
2990
|
public_key: text9("public_key").notNull(),
|
|
2986
|
-
transports:
|
|
2991
|
+
transports: jsonb11("transports").$type(),
|
|
2987
2992
|
user_id: varchar21("user_id", { length: ID_LENGTH18 }).notNull()
|
|
2988
2993
|
});
|
|
2989
2994
|
|
|
2990
2995
|
// src/webhooks/postgresStore.ts
|
|
2991
2996
|
import { desc as desc10, eq as eq22 } from "drizzle-orm";
|
|
2992
|
-
import { bigint as bigint20, jsonb as
|
|
2997
|
+
import { bigint as bigint20, jsonb as jsonb12, pgTable as pgTable22, text as text10, varchar as varchar22 } from "drizzle-orm/pg-core";
|
|
2993
2998
|
var ID_LENGTH19 = 255;
|
|
2994
2999
|
var URL_LENGTH3 = 2048;
|
|
2995
3000
|
var webhookDeliveriesTable = pgTable22("auth_webhook_deliveries", {
|
|
@@ -2997,7 +3002,7 @@ var webhookDeliveriesTable = pgTable22("auth_webhook_deliveries", {
|
|
|
2997
3002
|
created_at_ms: bigint20("created_at_ms", { mode: "number" }).notNull(),
|
|
2998
3003
|
endpoint_url: varchar22("endpoint_url", { length: URL_LENGTH3 }).notNull(),
|
|
2999
3004
|
envelope_id: varchar22("envelope_id", { length: ID_LENGTH19 }).primaryKey(),
|
|
3000
|
-
envelope_json:
|
|
3005
|
+
envelope_json: jsonb12("envelope_json").$type().notNull(),
|
|
3001
3006
|
last_error: text10("last_error"),
|
|
3002
3007
|
last_status: bigint20("last_status", { mode: "number" })
|
|
3003
3008
|
});
|
|
@@ -3388,5 +3393,5 @@ var main = async () => {
|
|
|
3388
3393
|
};
|
|
3389
3394
|
await main();
|
|
3390
3395
|
|
|
3391
|
-
//# debugId=
|
|
3396
|
+
//# debugId=590F86AE67EEB47A64756E2164756E21
|
|
3392
3397
|
//# sourceMappingURL=migrate.js.map
|