@shumai-one/shumai-transcode 0.0.9 → 0.0.11
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.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Media transcoding worker for the shumai media workspace",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"zod": "4.4.3"
|
|
27
27
|
},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@shumai-one/shumai-transcode-darwin-arm64": "0.0.
|
|
30
|
-
"@shumai-one/shumai-transcode-darwin-x64": "0.0.
|
|
31
|
-
"@shumai-one/shumai-transcode-linux-arm64": "0.0.
|
|
32
|
-
"@shumai-one/shumai-transcode-linux-x64": "0.0.
|
|
33
|
-
"@shumai-one/shumai-transcode-win32-arm64": "0.0.
|
|
34
|
-
"@shumai-one/shumai-transcode-win32-x64": "0.0.
|
|
29
|
+
"@shumai-one/shumai-transcode-darwin-arm64": "0.0.11",
|
|
30
|
+
"@shumai-one/shumai-transcode-darwin-x64": "0.0.11",
|
|
31
|
+
"@shumai-one/shumai-transcode-linux-arm64": "0.0.11",
|
|
32
|
+
"@shumai-one/shumai-transcode-linux-x64": "0.0.11",
|
|
33
|
+
"@shumai-one/shumai-transcode-win32-arm64": "0.0.11",
|
|
34
|
+
"@shumai-one/shumai-transcode-win32-x64": "0.0.11"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "api_tokens" (
|
|
3
|
+
"id" TEXT NOT NULL,
|
|
4
|
+
"token" TEXT NOT NULL,
|
|
5
|
+
"name" TEXT NOT NULL,
|
|
6
|
+
"user_id" TEXT NOT NULL,
|
|
7
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
8
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
9
|
+
|
|
10
|
+
CONSTRAINT "api_tokens_pkey" PRIMARY KEY ("id")
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
-- CreateIndex
|
|
14
|
+
CREATE UNIQUE INDEX "api_tokens_token_key" ON "api_tokens"("token");
|
|
15
|
+
|
|
16
|
+
-- AddForeignKey
|
|
17
|
+
ALTER TABLE "api_tokens" ADD CONSTRAINT "api_tokens_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -147,6 +147,7 @@ model User {
|
|
|
147
147
|
userMetadata UserMetadata[] @relation("UserToUserMetadata")
|
|
148
148
|
collections Collection[] @relation("UserToCollection")
|
|
149
149
|
shareLinks ShareLink[] @relation("UserToShareLink")
|
|
150
|
+
apiTokens ApiToken[] @relation("UserToApiToken")
|
|
150
151
|
|
|
151
152
|
@@map("users")
|
|
152
153
|
}
|
|
@@ -778,3 +779,15 @@ model Collection {
|
|
|
778
779
|
@@index([projectId, createdAt(sort: Desc)])
|
|
779
780
|
@@map("collections")
|
|
780
781
|
}
|
|
782
|
+
|
|
783
|
+
model ApiToken {
|
|
784
|
+
id String @id @default(ulid())
|
|
785
|
+
token String @unique @default(ulid())
|
|
786
|
+
name String
|
|
787
|
+
userId String @map("user_id")
|
|
788
|
+
user User @relation("UserToApiToken", fields: [userId], references: [id], onDelete: Cascade)
|
|
789
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
790
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
791
|
+
|
|
792
|
+
@@map("api_tokens")
|
|
793
|
+
}
|