@shumai-one/shumai-transcode 0.6.1 → 0.6.3
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/bin/{chunk-v49phje2.js → chunk-37b4yebq.js} +1 -1
- package/bin/{chunk-bd555g42.js → chunk-ag9mwr19.js} +1 -1
- package/bin/chunk-bdbpmmsb.js +44 -0
- package/bin/{chunk-sh6e8wpr.js → chunk-bhs7t60p.js} +1 -1
- package/bin/chunk-bk6hev6n.js +2 -0
- package/bin/{chunk-xaghyk05.js → chunk-d0jvf3v9.js} +1 -1
- package/bin/{chunk-29njhseb.js → chunk-g7sabq31.js} +1 -1
- package/bin/{chunk-h57szxpw.js → chunk-gk27fb49.js} +1 -1
- package/bin/{chunk-4yv0xe5h.js → chunk-jatypd6v.js} +1 -1
- package/bin/{chunk-r2ct68mr.js → chunk-kpv7gjx8.js} +1 -1
- package/bin/{chunk-2dm2ka6t.js → chunk-ktzd7mzd.js} +2 -2
- package/bin/{chunk-atg5v831.js → chunk-m4w6qapx.js} +1 -1
- package/bin/{chunk-69dvjzwn.js → chunk-p55ygz9w.js} +1 -1
- package/bin/shumai-transcode-app.js +265 -78
- package/package.json +7 -7
- package/prisma/migrations/20261026024507_hash_api_tokens/migration.sql +28 -0
- package/prisma/migrations/20261026031904_add_audit_log_via/migration.sql +2 -0
- package/prisma/migrations/20261029024626_add_oauth_and_jwks/migration.sql +205 -0
- package/prisma/migrations/20261029030321_default_empty_arrays_oauth/migration.sql +25 -0
- package/prisma/schema.prisma +186 -1
- package/bin/chunk-c8cevptj.js +0 -2
- package/bin/chunk-fy14v1v4.js +0 -44
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shumai-one/shumai-transcode",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Media transcoding worker for the shumai media workspace",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"exiftool-vendored": "38.1.0"
|
|
26
26
|
},
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"@shumai-one/shumai-transcode-darwin-arm64": "0.6.
|
|
29
|
-
"@shumai-one/shumai-transcode-darwin-x64": "0.6.
|
|
30
|
-
"@shumai-one/shumai-transcode-linux-arm64": "0.6.
|
|
31
|
-
"@shumai-one/shumai-transcode-linux-x64": "0.6.
|
|
32
|
-
"@shumai-one/shumai-transcode-win32-arm64": "0.6.
|
|
33
|
-
"@shumai-one/shumai-transcode-win32-x64": "0.6.
|
|
28
|
+
"@shumai-one/shumai-transcode-darwin-arm64": "0.6.3",
|
|
29
|
+
"@shumai-one/shumai-transcode-darwin-x64": "0.6.3",
|
|
30
|
+
"@shumai-one/shumai-transcode-linux-arm64": "0.6.3",
|
|
31
|
+
"@shumai-one/shumai-transcode-linux-x64": "0.6.3",
|
|
32
|
+
"@shumai-one/shumai-transcode-win32-arm64": "0.6.3",
|
|
33
|
+
"@shumai-one/shumai-transcode-win32-x64": "0.6.3"
|
|
34
34
|
},
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
-- Store API tokens as SHA-256 digests instead of plaintext.
|
|
2
|
+
--
|
|
3
|
+
-- Existing tokens keep working: their plaintext is hashed in place with the same
|
|
4
|
+
-- algorithm the application uses (hex-encoded SHA-256 of the UTF-8 token), so
|
|
5
|
+
-- clients holding the plaintext still authenticate. This migration is one-way:
|
|
6
|
+
-- after it runs the plaintext values are gone.
|
|
7
|
+
|
|
8
|
+
-- AlterTable: add the new columns as nullable so existing rows can be backfilled
|
|
9
|
+
ALTER TABLE "api_tokens" ADD COLUMN "token_hash" TEXT,
|
|
10
|
+
ADD COLUMN "token_hint" TEXT;
|
|
11
|
+
|
|
12
|
+
-- Backfill: keep the last 4 characters for display, then hash the plaintext
|
|
13
|
+
UPDATE "api_tokens"
|
|
14
|
+
SET "token_hint" = right("token", 4),
|
|
15
|
+
"token_hash" = encode(sha256(convert_to("token", 'UTF8')), 'hex');
|
|
16
|
+
|
|
17
|
+
-- AlterTable: enforce the final shape
|
|
18
|
+
ALTER TABLE "api_tokens" ALTER COLUMN "token_hash" SET NOT NULL,
|
|
19
|
+
ALTER COLUMN "token_hint" SET NOT NULL;
|
|
20
|
+
|
|
21
|
+
-- DropIndex
|
|
22
|
+
DROP INDEX "api_tokens_token_key";
|
|
23
|
+
|
|
24
|
+
-- AlterTable
|
|
25
|
+
ALTER TABLE "api_tokens" DROP COLUMN "token";
|
|
26
|
+
|
|
27
|
+
-- CreateIndex
|
|
28
|
+
CREATE UNIQUE INDEX "api_tokens_token_hash_key" ON "api_tokens"("token_hash");
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "jwks" (
|
|
3
|
+
"id" TEXT NOT NULL,
|
|
4
|
+
"public_key" TEXT NOT NULL,
|
|
5
|
+
"private_key" TEXT NOT NULL,
|
|
6
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
7
|
+
"expires_at" TIMESTAMP(3),
|
|
8
|
+
"alg" TEXT,
|
|
9
|
+
"crv" TEXT,
|
|
10
|
+
|
|
11
|
+
CONSTRAINT "jwks_pkey" PRIMARY KEY ("id")
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
-- CreateTable
|
|
15
|
+
CREATE TABLE "oauth_clients" (
|
|
16
|
+
"id" TEXT NOT NULL,
|
|
17
|
+
"client_id" TEXT NOT NULL,
|
|
18
|
+
"client_secret" TEXT,
|
|
19
|
+
"client_discovery_id" TEXT,
|
|
20
|
+
"disabled" BOOLEAN DEFAULT false,
|
|
21
|
+
"skip_consent" BOOLEAN,
|
|
22
|
+
"enable_end_session" BOOLEAN,
|
|
23
|
+
"subject_type" TEXT,
|
|
24
|
+
"scopes" TEXT[],
|
|
25
|
+
"client_credentials_scopes" TEXT[] DEFAULT ARRAY[]::TEXT[],
|
|
26
|
+
"user_id" TEXT,
|
|
27
|
+
"created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
|
28
|
+
"updated_at" TIMESTAMP(3),
|
|
29
|
+
"name" TEXT,
|
|
30
|
+
"uri" TEXT,
|
|
31
|
+
"icon" TEXT,
|
|
32
|
+
"contacts" TEXT[],
|
|
33
|
+
"tos" TEXT,
|
|
34
|
+
"policy" TEXT,
|
|
35
|
+
"software_id" TEXT,
|
|
36
|
+
"software_version" TEXT,
|
|
37
|
+
"software_statement" TEXT,
|
|
38
|
+
"redirect_uris" TEXT[],
|
|
39
|
+
"post_logout_redirect_uris" TEXT[],
|
|
40
|
+
"backchannel_logout_uri" TEXT,
|
|
41
|
+
"backchannel_logout_session_required" BOOLEAN,
|
|
42
|
+
"token_endpoint_auth_method" TEXT,
|
|
43
|
+
"application_type" TEXT,
|
|
44
|
+
"jwks" TEXT,
|
|
45
|
+
"jwks_uri" TEXT,
|
|
46
|
+
"grant_types" TEXT[],
|
|
47
|
+
"response_types" TEXT[],
|
|
48
|
+
"require_pkce" BOOLEAN,
|
|
49
|
+
"dpop_bound_access_tokens" BOOLEAN DEFAULT false,
|
|
50
|
+
"reference_id" TEXT,
|
|
51
|
+
"metadata" JSONB,
|
|
52
|
+
|
|
53
|
+
CONSTRAINT "oauth_clients_pkey" PRIMARY KEY ("id")
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
-- CreateTable
|
|
57
|
+
CREATE TABLE "oauth_resources" (
|
|
58
|
+
"id" TEXT NOT NULL,
|
|
59
|
+
"identifier" TEXT NOT NULL,
|
|
60
|
+
"name" TEXT NOT NULL,
|
|
61
|
+
"access_token_ttl" INTEGER,
|
|
62
|
+
"refresh_token_ttl" INTEGER,
|
|
63
|
+
"signing_algorithm" TEXT,
|
|
64
|
+
"signing_key_id" TEXT,
|
|
65
|
+
"allowed_scopes" TEXT[],
|
|
66
|
+
"custom_claims" JSONB,
|
|
67
|
+
"dpop_bound_access_tokens_required" BOOLEAN DEFAULT false,
|
|
68
|
+
"disabled" BOOLEAN DEFAULT false,
|
|
69
|
+
"created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
|
70
|
+
"updated_at" TIMESTAMP(3),
|
|
71
|
+
"policy_version" INTEGER DEFAULT 1,
|
|
72
|
+
"metadata" JSONB,
|
|
73
|
+
|
|
74
|
+
CONSTRAINT "oauth_resources_pkey" PRIMARY KEY ("id")
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
-- CreateTable
|
|
78
|
+
CREATE TABLE "oauth_client_resources" (
|
|
79
|
+
"id" TEXT NOT NULL,
|
|
80
|
+
"client_id" TEXT NOT NULL,
|
|
81
|
+
"resource_id" TEXT NOT NULL,
|
|
82
|
+
"metadata" JSONB,
|
|
83
|
+
"created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
|
84
|
+
|
|
85
|
+
CONSTRAINT "oauth_client_resources_pkey" PRIMARY KEY ("id")
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
-- CreateTable
|
|
89
|
+
CREATE TABLE "oauth_refresh_tokens" (
|
|
90
|
+
"id" TEXT NOT NULL,
|
|
91
|
+
"token" TEXT NOT NULL,
|
|
92
|
+
"client_id" TEXT NOT NULL,
|
|
93
|
+
"session_id" TEXT,
|
|
94
|
+
"user_id" TEXT NOT NULL,
|
|
95
|
+
"reference_id" TEXT,
|
|
96
|
+
"authorization_code_id" TEXT,
|
|
97
|
+
"resources" TEXT[],
|
|
98
|
+
"requested_user_info_claims" TEXT[],
|
|
99
|
+
"expires_at" TIMESTAMP(3) NOT NULL,
|
|
100
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
101
|
+
"revoked" TIMESTAMP(3),
|
|
102
|
+
"rotated_at" TIMESTAMP(3),
|
|
103
|
+
"rotation_replay_response" TEXT,
|
|
104
|
+
"rotation_replay_expires_at" TIMESTAMP(3),
|
|
105
|
+
"auth_time" TIMESTAMP(3),
|
|
106
|
+
"confirmation" JSONB,
|
|
107
|
+
"scopes" TEXT[],
|
|
108
|
+
|
|
109
|
+
CONSTRAINT "oauth_refresh_tokens_pkey" PRIMARY KEY ("id")
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
-- CreateTable
|
|
113
|
+
CREATE TABLE "oauth_access_tokens" (
|
|
114
|
+
"id" TEXT NOT NULL,
|
|
115
|
+
"token" TEXT NOT NULL,
|
|
116
|
+
"client_id" TEXT NOT NULL,
|
|
117
|
+
"session_id" TEXT,
|
|
118
|
+
"user_id" TEXT,
|
|
119
|
+
"reference_id" TEXT,
|
|
120
|
+
"authorization_code_id" TEXT,
|
|
121
|
+
"resources" TEXT[],
|
|
122
|
+
"requested_user_info_claims" TEXT[],
|
|
123
|
+
"refresh_id" TEXT,
|
|
124
|
+
"expires_at" TIMESTAMP(3) NOT NULL,
|
|
125
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
126
|
+
"revoked" TIMESTAMP(3),
|
|
127
|
+
"confirmation" JSONB,
|
|
128
|
+
"scopes" TEXT[],
|
|
129
|
+
|
|
130
|
+
CONSTRAINT "oauth_access_tokens_pkey" PRIMARY KEY ("id")
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
-- CreateTable
|
|
134
|
+
CREATE TABLE "oauth_consents" (
|
|
135
|
+
"id" TEXT NOT NULL,
|
|
136
|
+
"client_id" TEXT NOT NULL,
|
|
137
|
+
"user_id" TEXT,
|
|
138
|
+
"reference_id" TEXT,
|
|
139
|
+
"resources" TEXT[],
|
|
140
|
+
"requested_user_info_claims" TEXT[],
|
|
141
|
+
"scopes" TEXT[],
|
|
142
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
143
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
144
|
+
|
|
145
|
+
CONSTRAINT "oauth_consents_pkey" PRIMARY KEY ("id")
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
-- CreateTable
|
|
149
|
+
CREATE TABLE "oauth_client_assertions" (
|
|
150
|
+
"id" TEXT NOT NULL,
|
|
151
|
+
"expires_at" TIMESTAMP(3) NOT NULL,
|
|
152
|
+
|
|
153
|
+
CONSTRAINT "oauth_client_assertions_pkey" PRIMARY KEY ("id")
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
-- CreateIndex
|
|
157
|
+
CREATE UNIQUE INDEX "oauth_clients_client_id_key" ON "oauth_clients"("client_id");
|
|
158
|
+
|
|
159
|
+
-- CreateIndex
|
|
160
|
+
CREATE UNIQUE INDEX "oauth_resources_identifier_key" ON "oauth_resources"("identifier");
|
|
161
|
+
|
|
162
|
+
-- CreateIndex
|
|
163
|
+
CREATE UNIQUE INDEX "oauth_client_resources_client_id_resource_id_key" ON "oauth_client_resources"("client_id", "resource_id");
|
|
164
|
+
|
|
165
|
+
-- CreateIndex
|
|
166
|
+
CREATE UNIQUE INDEX "oauth_refresh_tokens_token_key" ON "oauth_refresh_tokens"("token");
|
|
167
|
+
|
|
168
|
+
-- CreateIndex
|
|
169
|
+
CREATE UNIQUE INDEX "oauth_access_tokens_token_key" ON "oauth_access_tokens"("token");
|
|
170
|
+
|
|
171
|
+
-- AddForeignKey
|
|
172
|
+
ALTER TABLE "oauth_clients" ADD CONSTRAINT "oauth_clients_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
173
|
+
|
|
174
|
+
-- AddForeignKey
|
|
175
|
+
ALTER TABLE "oauth_client_resources" ADD CONSTRAINT "oauth_client_resources_client_id_fkey" FOREIGN KEY ("client_id") REFERENCES "oauth_clients"("client_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
176
|
+
|
|
177
|
+
-- AddForeignKey
|
|
178
|
+
ALTER TABLE "oauth_client_resources" ADD CONSTRAINT "oauth_client_resources_resource_id_fkey" FOREIGN KEY ("resource_id") REFERENCES "oauth_resources"("identifier") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
179
|
+
|
|
180
|
+
-- AddForeignKey
|
|
181
|
+
ALTER TABLE "oauth_refresh_tokens" ADD CONSTRAINT "oauth_refresh_tokens_client_id_fkey" FOREIGN KEY ("client_id") REFERENCES "oauth_clients"("client_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
182
|
+
|
|
183
|
+
-- AddForeignKey
|
|
184
|
+
ALTER TABLE "oauth_refresh_tokens" ADD CONSTRAINT "oauth_refresh_tokens_session_id_fkey" FOREIGN KEY ("session_id") REFERENCES "sessions"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
185
|
+
|
|
186
|
+
-- AddForeignKey
|
|
187
|
+
ALTER TABLE "oauth_refresh_tokens" ADD CONSTRAINT "oauth_refresh_tokens_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
188
|
+
|
|
189
|
+
-- AddForeignKey
|
|
190
|
+
ALTER TABLE "oauth_access_tokens" ADD CONSTRAINT "oauth_access_tokens_client_id_fkey" FOREIGN KEY ("client_id") REFERENCES "oauth_clients"("client_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
191
|
+
|
|
192
|
+
-- AddForeignKey
|
|
193
|
+
ALTER TABLE "oauth_access_tokens" ADD CONSTRAINT "oauth_access_tokens_session_id_fkey" FOREIGN KEY ("session_id") REFERENCES "sessions"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
194
|
+
|
|
195
|
+
-- AddForeignKey
|
|
196
|
+
ALTER TABLE "oauth_access_tokens" ADD CONSTRAINT "oauth_access_tokens_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
197
|
+
|
|
198
|
+
-- AddForeignKey
|
|
199
|
+
ALTER TABLE "oauth_access_tokens" ADD CONSTRAINT "oauth_access_tokens_refresh_id_fkey" FOREIGN KEY ("refresh_id") REFERENCES "oauth_refresh_tokens"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
200
|
+
|
|
201
|
+
-- AddForeignKey
|
|
202
|
+
ALTER TABLE "oauth_consents" ADD CONSTRAINT "oauth_consents_client_id_fkey" FOREIGN KEY ("client_id") REFERENCES "oauth_clients"("client_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
203
|
+
|
|
204
|
+
-- AddForeignKey
|
|
205
|
+
ALTER TABLE "oauth_consents" ADD CONSTRAINT "oauth_consents_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
-- AlterTable
|
|
2
|
+
ALTER TABLE "oauth_access_tokens" ALTER COLUMN "resources" SET DEFAULT ARRAY[]::TEXT[],
|
|
3
|
+
ALTER COLUMN "requested_user_info_claims" SET DEFAULT ARRAY[]::TEXT[],
|
|
4
|
+
ALTER COLUMN "scopes" SET DEFAULT ARRAY[]::TEXT[];
|
|
5
|
+
|
|
6
|
+
-- AlterTable
|
|
7
|
+
ALTER TABLE "oauth_clients" ALTER COLUMN "scopes" SET DEFAULT ARRAY[]::TEXT[],
|
|
8
|
+
ALTER COLUMN "contacts" SET DEFAULT ARRAY[]::TEXT[],
|
|
9
|
+
ALTER COLUMN "redirect_uris" SET DEFAULT ARRAY[]::TEXT[],
|
|
10
|
+
ALTER COLUMN "post_logout_redirect_uris" SET DEFAULT ARRAY[]::TEXT[],
|
|
11
|
+
ALTER COLUMN "grant_types" SET DEFAULT ARRAY[]::TEXT[],
|
|
12
|
+
ALTER COLUMN "response_types" SET DEFAULT ARRAY[]::TEXT[];
|
|
13
|
+
|
|
14
|
+
-- AlterTable
|
|
15
|
+
ALTER TABLE "oauth_consents" ALTER COLUMN "resources" SET DEFAULT ARRAY[]::TEXT[],
|
|
16
|
+
ALTER COLUMN "requested_user_info_claims" SET DEFAULT ARRAY[]::TEXT[],
|
|
17
|
+
ALTER COLUMN "scopes" SET DEFAULT ARRAY[]::TEXT[];
|
|
18
|
+
|
|
19
|
+
-- AlterTable
|
|
20
|
+
ALTER TABLE "oauth_refresh_tokens" ALTER COLUMN "resources" SET DEFAULT ARRAY[]::TEXT[],
|
|
21
|
+
ALTER COLUMN "requested_user_info_claims" SET DEFAULT ARRAY[]::TEXT[],
|
|
22
|
+
ALTER COLUMN "scopes" SET DEFAULT ARRAY[]::TEXT[];
|
|
23
|
+
|
|
24
|
+
-- AlterTable
|
|
25
|
+
ALTER TABLE "oauth_resources" ALTER COLUMN "allowed_scopes" SET DEFAULT ARRAY[]::TEXT[];
|
package/prisma/schema.prisma
CHANGED
|
@@ -249,6 +249,10 @@ model User {
|
|
|
249
249
|
kanbanTaskComments KanbanTaskComment[]
|
|
250
250
|
kanbanTaskEvents KanbanTaskEvent[]
|
|
251
251
|
recentFiles RecentFileItem[]
|
|
252
|
+
oauthClients OauthClient[]
|
|
253
|
+
oauthRefreshTokens OauthRefreshToken[]
|
|
254
|
+
oauthAccessTokens OauthAccessToken[]
|
|
255
|
+
oauthConsents OauthConsent[]
|
|
252
256
|
|
|
253
257
|
@@map("users")
|
|
254
258
|
}
|
|
@@ -264,6 +268,9 @@ model Session {
|
|
|
264
268
|
userId String @map("user_id")
|
|
265
269
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
266
270
|
|
|
271
|
+
oauthRefreshTokens OauthRefreshToken[]
|
|
272
|
+
oauthAccessTokens OauthAccessToken[]
|
|
273
|
+
|
|
267
274
|
@@map("sessions")
|
|
268
275
|
}
|
|
269
276
|
|
|
@@ -1089,7 +1096,10 @@ model Collection {
|
|
|
1089
1096
|
|
|
1090
1097
|
model ApiToken {
|
|
1091
1098
|
id String @id @default(ulid())
|
|
1092
|
-
token
|
|
1099
|
+
/// SHA-256 hex digest of the plaintext token. The plaintext is never stored.
|
|
1100
|
+
tokenHash String @unique @map("token_hash")
|
|
1101
|
+
/// Last characters of the plaintext token, shown in the UI to identify it.
|
|
1102
|
+
tokenHint String @map("token_hint")
|
|
1093
1103
|
name String
|
|
1094
1104
|
userId String @map("user_id")
|
|
1095
1105
|
user User @relation("UserToApiToken", fields: [userId], references: [id], onDelete: Cascade)
|
|
@@ -1129,6 +1139,8 @@ model AuditLog {
|
|
|
1129
1139
|
agentId String? @map("agent_id")
|
|
1130
1140
|
projectId String? @map("project_id")
|
|
1131
1141
|
itemId String? @map("item_id")
|
|
1142
|
+
/// Surface the action came through: api, agent, mcp, or cli. Null for actions recorded outside Operations.
|
|
1143
|
+
via String? @map("via")
|
|
1132
1144
|
createdAt DateTime @default(now()) @map("created_at")
|
|
1133
1145
|
|
|
1134
1146
|
team Team @relation("TeamToAuditLog", fields: [teamId], references: [id], onDelete: Cascade)
|
|
@@ -1339,5 +1351,178 @@ model RecentFileItem {
|
|
|
1339
1351
|
@@map("recent_file_items")
|
|
1340
1352
|
}
|
|
1341
1353
|
|
|
1354
|
+
model Jwks {
|
|
1355
|
+
id String @id @default(ulid())
|
|
1356
|
+
publicKey String @map("public_key")
|
|
1357
|
+
privateKey String @map("private_key")
|
|
1358
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1359
|
+
expiresAt DateTime? @map("expires_at")
|
|
1360
|
+
alg String?
|
|
1361
|
+
crv String?
|
|
1362
|
+
|
|
1363
|
+
@@map("jwks")
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
model OauthClient {
|
|
1367
|
+
id String @id @default(ulid())
|
|
1368
|
+
clientId String @unique @map("client_id")
|
|
1369
|
+
clientSecret String? @map("client_secret")
|
|
1370
|
+
clientDiscoveryId String? @map("client_discovery_id")
|
|
1371
|
+
disabled Boolean? @default(false)
|
|
1372
|
+
skipConsent Boolean? @map("skip_consent")
|
|
1373
|
+
enableEndSession Boolean? @map("enable_end_session")
|
|
1374
|
+
subjectType String? @map("subject_type")
|
|
1375
|
+
scopes String[] @default([])
|
|
1376
|
+
clientCredentialsScopes String[] @default([]) @map("client_credentials_scopes")
|
|
1377
|
+
userId String? @map("user_id")
|
|
1378
|
+
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1379
|
+
createdAt DateTime? @default(now()) @map("created_at")
|
|
1380
|
+
updatedAt DateTime? @updatedAt @map("updated_at")
|
|
1381
|
+
name String?
|
|
1382
|
+
uri String?
|
|
1383
|
+
icon String?
|
|
1384
|
+
contacts String[] @default([])
|
|
1385
|
+
tos String?
|
|
1386
|
+
policy String?
|
|
1387
|
+
softwareId String? @map("software_id")
|
|
1388
|
+
softwareVersion String? @map("software_version")
|
|
1389
|
+
softwareStatement String? @map("software_statement")
|
|
1390
|
+
redirectUris String[] @default([]) @map("redirect_uris")
|
|
1391
|
+
postLogoutRedirectUris String[] @default([]) @map("post_logout_redirect_uris")
|
|
1392
|
+
backchannelLogoutUri String? @map("backchannel_logout_uri")
|
|
1393
|
+
backchannelLogoutSessionRequired Boolean? @map("backchannel_logout_session_required")
|
|
1394
|
+
tokenEndpointAuthMethod String? @map("token_endpoint_auth_method")
|
|
1395
|
+
applicationType String? @map("application_type")
|
|
1396
|
+
jwks String?
|
|
1397
|
+
jwksUri String? @map("jwks_uri")
|
|
1398
|
+
grantTypes String[] @default([]) @map("grant_types")
|
|
1399
|
+
responseTypes String[] @default([]) @map("response_types")
|
|
1400
|
+
requirePKCE Boolean? @map("require_pkce")
|
|
1401
|
+
dpopBoundAccessTokens Boolean? @default(false) @map("dpop_bound_access_tokens")
|
|
1402
|
+
referenceId String? @map("reference_id")
|
|
1403
|
+
/// [OauthMetadata]
|
|
1404
|
+
metadata Json?
|
|
1405
|
+
|
|
1406
|
+
clientResources OauthClientResource[]
|
|
1407
|
+
refreshTokens OauthRefreshToken[]
|
|
1408
|
+
accessTokens OauthAccessToken[]
|
|
1409
|
+
consents OauthConsent[]
|
|
1410
|
+
|
|
1411
|
+
@@map("oauth_clients")
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
model OauthResource {
|
|
1415
|
+
id String @id @default(ulid())
|
|
1416
|
+
identifier String @unique
|
|
1417
|
+
name String
|
|
1418
|
+
accessTokenTtl Int? @map("access_token_ttl")
|
|
1419
|
+
refreshTokenTtl Int? @map("refresh_token_ttl")
|
|
1420
|
+
signingAlgorithm String? @map("signing_algorithm")
|
|
1421
|
+
signingKeyId String? @map("signing_key_id")
|
|
1422
|
+
allowedScopes String[] @default([]) @map("allowed_scopes")
|
|
1423
|
+
/// [OauthCustomClaims]
|
|
1424
|
+
customClaims Json? @map("custom_claims")
|
|
1425
|
+
dpopBoundAccessTokensRequired Boolean? @default(false) @map("dpop_bound_access_tokens_required")
|
|
1426
|
+
disabled Boolean? @default(false)
|
|
1427
|
+
createdAt DateTime? @default(now()) @map("created_at")
|
|
1428
|
+
updatedAt DateTime? @updatedAt @map("updated_at")
|
|
1429
|
+
policyVersion Int? @default(1) @map("policy_version")
|
|
1430
|
+
/// [OauthMetadata]
|
|
1431
|
+
metadata Json?
|
|
1432
|
+
|
|
1433
|
+
clientResources OauthClientResource[]
|
|
1434
|
+
|
|
1435
|
+
@@map("oauth_resources")
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
model OauthClientResource {
|
|
1439
|
+
id String @id @default(ulid())
|
|
1440
|
+
clientId String @map("client_id")
|
|
1441
|
+
client OauthClient @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
|
|
1442
|
+
resourceId String @map("resource_id")
|
|
1443
|
+
resource OauthResource @relation(fields: [resourceId], references: [identifier], onDelete: Cascade)
|
|
1444
|
+
/// [OauthMetadata]
|
|
1445
|
+
metadata Json?
|
|
1446
|
+
createdAt DateTime? @default(now()) @map("created_at")
|
|
1447
|
+
|
|
1448
|
+
@@unique([clientId, resourceId])
|
|
1449
|
+
@@map("oauth_client_resources")
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
model OauthRefreshToken {
|
|
1453
|
+
id String @id @default(ulid())
|
|
1454
|
+
token String @unique
|
|
1455
|
+
clientId String @map("client_id")
|
|
1456
|
+
client OauthClient @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
|
|
1457
|
+
sessionId String? @map("session_id")
|
|
1458
|
+
session Session? @relation(fields: [sessionId], references: [id], onDelete: SetNull)
|
|
1459
|
+
userId String @map("user_id")
|
|
1460
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1461
|
+
referenceId String? @map("reference_id")
|
|
1462
|
+
authorizationCodeId String? @map("authorization_code_id")
|
|
1463
|
+
resources String[] @default([])
|
|
1464
|
+
requestedUserInfoClaims String[] @default([]) @map("requested_user_info_claims")
|
|
1465
|
+
expiresAt DateTime @map("expires_at")
|
|
1466
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1467
|
+
revoked DateTime?
|
|
1468
|
+
rotatedAt DateTime? @map("rotated_at")
|
|
1469
|
+
rotationReplayResponse String? @map("rotation_replay_response")
|
|
1470
|
+
rotationReplayExpiresAt DateTime? @map("rotation_replay_expires_at")
|
|
1471
|
+
authTime DateTime? @map("auth_time")
|
|
1472
|
+
/// [OauthConfirmation]
|
|
1473
|
+
confirmation Json?
|
|
1474
|
+
scopes String[] @default([])
|
|
1475
|
+
|
|
1476
|
+
accessTokens OauthAccessToken[]
|
|
1477
|
+
|
|
1478
|
+
@@map("oauth_refresh_tokens")
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
model OauthAccessToken {
|
|
1482
|
+
id String @id @default(ulid())
|
|
1483
|
+
token String @unique
|
|
1484
|
+
clientId String @map("client_id")
|
|
1485
|
+
client OauthClient @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
|
|
1486
|
+
sessionId String? @map("session_id")
|
|
1487
|
+
session Session? @relation(fields: [sessionId], references: [id], onDelete: SetNull)
|
|
1488
|
+
userId String? @map("user_id")
|
|
1489
|
+
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1490
|
+
referenceId String? @map("reference_id")
|
|
1491
|
+
authorizationCodeId String? @map("authorization_code_id")
|
|
1492
|
+
resources String[] @default([])
|
|
1493
|
+
requestedUserInfoClaims String[] @default([]) @map("requested_user_info_claims")
|
|
1494
|
+
refreshId String? @map("refresh_id")
|
|
1495
|
+
refreshToken OauthRefreshToken? @relation(fields: [refreshId], references: [id], onDelete: Cascade)
|
|
1496
|
+
expiresAt DateTime @map("expires_at")
|
|
1497
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1498
|
+
revoked DateTime?
|
|
1499
|
+
/// [OauthConfirmation]
|
|
1500
|
+
confirmation Json?
|
|
1501
|
+
scopes String[] @default([])
|
|
1502
|
+
|
|
1503
|
+
@@map("oauth_access_tokens")
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
model OauthConsent {
|
|
1507
|
+
id String @id @default(ulid())
|
|
1508
|
+
clientId String @map("client_id")
|
|
1509
|
+
client OauthClient @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
|
|
1510
|
+
userId String? @map("user_id")
|
|
1511
|
+
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1512
|
+
referenceId String? @map("reference_id")
|
|
1513
|
+
resources String[] @default([])
|
|
1514
|
+
requestedUserInfoClaims String[] @default([]) @map("requested_user_info_claims")
|
|
1515
|
+
scopes String[] @default([])
|
|
1516
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1517
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1518
|
+
|
|
1519
|
+
@@map("oauth_consents")
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
model OauthClientAssertion {
|
|
1523
|
+
id String @id @default(ulid())
|
|
1524
|
+
expiresAt DateTime @map("expires_at")
|
|
1342
1525
|
|
|
1526
|
+
@@map("oauth_client_assertions")
|
|
1527
|
+
}
|
|
1343
1528
|
|
package/bin/chunk-c8cevptj.js
DELETED