@shumai-one/shumai-transcode 0.3.2 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shumai-one/shumai-transcode",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Media transcoding worker for the shumai media workspace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,12 +27,12 @@
27
27
  "zod": "4.4.3"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@shumai-one/shumai-transcode-darwin-arm64": "0.3.2",
31
- "@shumai-one/shumai-transcode-darwin-x64": "0.3.2",
32
- "@shumai-one/shumai-transcode-linux-arm64": "0.3.2",
33
- "@shumai-one/shumai-transcode-linux-x64": "0.3.2",
34
- "@shumai-one/shumai-transcode-win32-arm64": "0.3.2",
35
- "@shumai-one/shumai-transcode-win32-x64": "0.3.2"
30
+ "@shumai-one/shumai-transcode-darwin-arm64": "0.3.3",
31
+ "@shumai-one/shumai-transcode-darwin-x64": "0.3.3",
32
+ "@shumai-one/shumai-transcode-linux-arm64": "0.3.3",
33
+ "@shumai-one/shumai-transcode-linux-x64": "0.3.3",
34
+ "@shumai-one/shumai-transcode-win32-arm64": "0.3.3",
35
+ "@shumai-one/shumai-transcode-win32-x64": "0.3.3"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
@@ -0,0 +1,33 @@
1
+ -- CreateTable
2
+ CREATE TABLE "audit_logs" (
3
+ "id" TEXT NOT NULL,
4
+ "action" TEXT NOT NULL,
5
+ "team_id" TEXT NOT NULL,
6
+ "user_id" TEXT,
7
+ "project_id" TEXT,
8
+ "item_id" TEXT,
9
+ "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
10
+
11
+ CONSTRAINT "audit_logs_pkey" PRIMARY KEY ("id")
12
+ );
13
+
14
+ -- CreateIndex
15
+ CREATE INDEX "audit_logs_team_id_id_idx" ON "audit_logs"("team_id", "id" DESC);
16
+
17
+ -- CreateIndex
18
+ CREATE INDEX "audit_logs_user_id_idx" ON "audit_logs"("user_id");
19
+
20
+ -- CreateIndex
21
+ CREATE INDEX "audit_logs_action_idx" ON "audit_logs"("action");
22
+
23
+ -- CreateIndex
24
+ CREATE INDEX "audit_logs_item_id_idx" ON "audit_logs"("item_id");
25
+
26
+ -- AddForeignKey
27
+ ALTER TABLE "audit_logs" ADD CONSTRAINT "audit_logs_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
28
+
29
+ -- AddForeignKey
30
+ ALTER TABLE "audit_logs" ADD CONSTRAINT "audit_logs_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
31
+
32
+ -- AddForeignKey
33
+ ALTER TABLE "audit_logs" ADD CONSTRAINT "audit_logs_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "projects"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "assets" ADD COLUMN "autofill_context" TEXT;
@@ -156,6 +156,7 @@ model User {
156
156
  shareLinks ShareLink[] @relation("UserToShareLink")
157
157
  apiTokens ApiToken[] @relation("UserToApiToken")
158
158
  aiUsages AiUsage[] @relation("UserToAiUsage")
159
+ auditLogs AuditLog[] @relation("UserToAuditLog")
159
160
 
160
161
  @@map("users")
161
162
  }
@@ -239,6 +240,7 @@ model Team {
239
240
  sandbox Sandbox? @relation("TeamToSandbox")
240
241
  agents Agent[] @relation("TeamToAgent")
241
242
  aiUsages AiUsage[] @relation("TeamToAiUsage")
243
+ auditLogs AuditLog[] @relation("TeamToAuditLog")
242
244
 
243
245
  @@map("teams")
244
246
  }
@@ -322,6 +324,7 @@ model Project {
322
324
  notifications Notification[] @relation("ProjectToNotification")
323
325
  shareLinks ShareLink[] @relation("ProjectToShareLink")
324
326
  collections Collection[] @relation("ProjectToCollection")
327
+ auditLogs AuditLog[] @relation("ProjectToAuditLog")
325
328
 
326
329
  @@map("projects")
327
330
  @@index([createdAt])
@@ -379,6 +382,7 @@ model Asset {
379
382
  transcodeTaskId String? @map("transcode_task_id")
380
383
  /// [MediaInfo]
381
384
  media Json?
385
+ autofillContext String? @map("autofill_context")
382
386
  isDeleted Boolean @default(false) @map("is_deleted")
383
387
  deletedAt DateTime? @map("deleted_at")
384
388
  sortIndex String? @map("sort_index")
@@ -845,3 +849,24 @@ model AiUsage {
845
849
  @@index([teamId, userId, periodStart])
846
850
  }
847
851
 
852
+ model AuditLog {
853
+ id String @id @default(ulid())
854
+ action String
855
+ teamId String @map("team_id")
856
+ userId String? @map("user_id")
857
+ projectId String? @map("project_id")
858
+ itemId String? @map("item_id")
859
+ createdAt DateTime @default(now()) @map("created_at")
860
+
861
+ team Team @relation("TeamToAuditLog", fields: [teamId], references: [id], onDelete: Cascade)
862
+ user User? @relation("UserToAuditLog", fields: [userId], references: [id], onDelete: SetNull)
863
+ project Project? @relation("ProjectToAuditLog", fields: [projectId], references: [id], onDelete: SetNull)
864
+
865
+ @@index([teamId, id(sort: Desc)])
866
+ @@index([userId])
867
+ @@index([action])
868
+ @@index([itemId])
869
+ @@map("audit_logs")
870
+ }
871
+
872
+