@adaptware/eagles-db 0.6.10 → 0.6.12
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/client/edge.js +64 -7
- package/client/index-browser.js +58 -0
- package/client/index.d.ts +5755 -201
- package/client/index.js +64 -7
- package/client/package.json +1 -1
- package/client/schema.prisma +70 -0
- package/client/wasm.js +64 -7
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/mcpOAuth.prisma +69 -0
- package/prisma/schema/migrations/.DS_Store +0 -0
- package/prisma/schema/migrations/20261015120000_mcp_oauth/migration.sql +84 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/.DS_Store +0 -0
package/package.json
CHANGED
package/prisma/.DS_Store
CHANGED
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/// MCP OAuth clients, authorize requests, auth codes, and refresh tokens.
|
|
2
|
+
/// user_id is a plain string. These models do not add a relation on User.
|
|
3
|
+
|
|
4
|
+
model McpOAuthClient {
|
|
5
|
+
id String @id @default(uuid())
|
|
6
|
+
client_id String @unique
|
|
7
|
+
name String?
|
|
8
|
+
redirect_uris String
|
|
9
|
+
organisation_id String
|
|
10
|
+
is_active Boolean @default(true)
|
|
11
|
+
created_at DateTime @default(now())
|
|
12
|
+
|
|
13
|
+
@@index([organisation_id])
|
|
14
|
+
@@schema("public")
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
model McpOAuthRequest {
|
|
18
|
+
id String @id @default(uuid())
|
|
19
|
+
organisation_id String
|
|
20
|
+
client_id String
|
|
21
|
+
redirect_uri String
|
|
22
|
+
code_challenge String
|
|
23
|
+
state String?
|
|
24
|
+
resource String
|
|
25
|
+
csrf_hash String?
|
|
26
|
+
session_hash String?
|
|
27
|
+
ticket_hash String?
|
|
28
|
+
user_id String?
|
|
29
|
+
expires_at DateTime
|
|
30
|
+
used_at DateTime?
|
|
31
|
+
created_at DateTime @default(now())
|
|
32
|
+
|
|
33
|
+
@@index([organisation_id, expires_at])
|
|
34
|
+
@@schema("public")
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
model McpOAuthCode {
|
|
38
|
+
id String @id @default(uuid())
|
|
39
|
+
code_hash String @unique
|
|
40
|
+
organisation_id String
|
|
41
|
+
client_id String
|
|
42
|
+
user_id String
|
|
43
|
+
redirect_uri String
|
|
44
|
+
code_challenge String
|
|
45
|
+
resource String
|
|
46
|
+
expires_at DateTime
|
|
47
|
+
used_at DateTime?
|
|
48
|
+
created_at DateTime @default(now())
|
|
49
|
+
|
|
50
|
+
@@index([organisation_id, expires_at])
|
|
51
|
+
@@schema("public")
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
model McpOAuthRefreshToken {
|
|
55
|
+
id String @id @default(uuid())
|
|
56
|
+
token_hash String @unique
|
|
57
|
+
family_id String
|
|
58
|
+
organisation_id String
|
|
59
|
+
client_id String
|
|
60
|
+
user_id String
|
|
61
|
+
resource String
|
|
62
|
+
expires_at DateTime
|
|
63
|
+
revoked_at DateTime?
|
|
64
|
+
created_at DateTime @default(now())
|
|
65
|
+
|
|
66
|
+
@@index([family_id])
|
|
67
|
+
@@index([expires_at])
|
|
68
|
+
@@schema("public")
|
|
69
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
-- Additive MCP OAuth tables. No foreign key to "User"; user_id is a plain string.
|
|
2
|
+
-- Existing tables are not altered.
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS "public"."McpOAuthClient" (
|
|
5
|
+
"id" TEXT NOT NULL,
|
|
6
|
+
"client_id" TEXT NOT NULL,
|
|
7
|
+
"name" TEXT,
|
|
8
|
+
"redirect_uris" TEXT NOT NULL,
|
|
9
|
+
"organisation_id" TEXT NOT NULL,
|
|
10
|
+
"is_active" BOOLEAN NOT NULL DEFAULT true,
|
|
11
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
12
|
+
CONSTRAINT "McpOAuthClient_pkey" PRIMARY KEY ("id")
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "McpOAuthClient_client_id_key"
|
|
16
|
+
ON "public"."McpOAuthClient"("client_id");
|
|
17
|
+
|
|
18
|
+
CREATE INDEX IF NOT EXISTS "McpOAuthClient_organisation_id_idx"
|
|
19
|
+
ON "public"."McpOAuthClient"("organisation_id");
|
|
20
|
+
|
|
21
|
+
CREATE TABLE IF NOT EXISTS "public"."McpOAuthRequest" (
|
|
22
|
+
"id" TEXT NOT NULL,
|
|
23
|
+
"organisation_id" TEXT NOT NULL,
|
|
24
|
+
"client_id" TEXT NOT NULL,
|
|
25
|
+
"redirect_uri" TEXT NOT NULL,
|
|
26
|
+
"code_challenge" TEXT NOT NULL,
|
|
27
|
+
"state" TEXT,
|
|
28
|
+
"resource" TEXT NOT NULL,
|
|
29
|
+
"csrf_hash" TEXT,
|
|
30
|
+
"session_hash" TEXT,
|
|
31
|
+
"ticket_hash" TEXT,
|
|
32
|
+
"user_id" TEXT,
|
|
33
|
+
"expires_at" TIMESTAMP(3) NOT NULL,
|
|
34
|
+
"used_at" TIMESTAMP(3),
|
|
35
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
36
|
+
CONSTRAINT "McpOAuthRequest_pkey" PRIMARY KEY ("id")
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
CREATE INDEX IF NOT EXISTS "McpOAuthRequest_organisation_id_expires_at_idx"
|
|
40
|
+
ON "public"."McpOAuthRequest"("organisation_id", "expires_at");
|
|
41
|
+
|
|
42
|
+
CREATE TABLE IF NOT EXISTS "public"."McpOAuthCode" (
|
|
43
|
+
"id" TEXT NOT NULL,
|
|
44
|
+
"code_hash" TEXT NOT NULL,
|
|
45
|
+
"organisation_id" TEXT NOT NULL,
|
|
46
|
+
"client_id" TEXT NOT NULL,
|
|
47
|
+
"user_id" TEXT NOT NULL,
|
|
48
|
+
"redirect_uri" TEXT NOT NULL,
|
|
49
|
+
"code_challenge" TEXT NOT NULL,
|
|
50
|
+
"resource" TEXT NOT NULL,
|
|
51
|
+
"expires_at" TIMESTAMP(3) NOT NULL,
|
|
52
|
+
"used_at" TIMESTAMP(3),
|
|
53
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
54
|
+
CONSTRAINT "McpOAuthCode_pkey" PRIMARY KEY ("id")
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "McpOAuthCode_code_hash_key"
|
|
58
|
+
ON "public"."McpOAuthCode"("code_hash");
|
|
59
|
+
|
|
60
|
+
CREATE INDEX IF NOT EXISTS "McpOAuthCode_organisation_id_expires_at_idx"
|
|
61
|
+
ON "public"."McpOAuthCode"("organisation_id", "expires_at");
|
|
62
|
+
|
|
63
|
+
CREATE TABLE IF NOT EXISTS "public"."McpOAuthRefreshToken" (
|
|
64
|
+
"id" TEXT NOT NULL,
|
|
65
|
+
"token_hash" TEXT NOT NULL,
|
|
66
|
+
"family_id" TEXT NOT NULL,
|
|
67
|
+
"organisation_id" TEXT NOT NULL,
|
|
68
|
+
"client_id" TEXT NOT NULL,
|
|
69
|
+
"user_id" TEXT NOT NULL,
|
|
70
|
+
"resource" TEXT NOT NULL,
|
|
71
|
+
"expires_at" TIMESTAMP(3) NOT NULL,
|
|
72
|
+
"revoked_at" TIMESTAMP(3),
|
|
73
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
74
|
+
CONSTRAINT "McpOAuthRefreshToken_pkey" PRIMARY KEY ("id")
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "McpOAuthRefreshToken_token_hash_key"
|
|
78
|
+
ON "public"."McpOAuthRefreshToken"("token_hash");
|
|
79
|
+
|
|
80
|
+
CREATE INDEX IF NOT EXISTS "McpOAuthRefreshToken_family_id_idx"
|
|
81
|
+
ON "public"."McpOAuthRefreshToken"("family_id");
|
|
82
|
+
|
|
83
|
+
CREATE INDEX IF NOT EXISTS "McpOAuthRefreshToken_expires_at_idx"
|
|
84
|
+
ON "public"."McpOAuthRefreshToken"("expires_at");
|
package/prisma/schema/.DS_Store
DELETED
|
Binary file
|