Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apis/api-gateway/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,10 @@ type Video @join__type(graph: API_JOURNEYS, key: "id primaryLanguageId", extensi
keywords(languageId: ID) : [Keyword!]! @join__field(graph: API_MEDIA)
label: VideoLabel! @join__field(graph: API_MEDIA)
locked: Boolean! @join__field(graph: API_MEDIA)
"""
When true, automated systems must not add dubbed audio variants or subtitle tracks to this video without express permission. Metadata translations (title, description, study questions) are unaffected.
"""
restrictAutoTranslations: Boolean! @join__field(graph: API_MEDIA)
published: Boolean! @join__field(graph: API_MEDIA)
cloudflareAssets: [CloudflareR2!]! @join__field(graph: API_MEDIA)
videoEditions: [VideoEdition!]! @join__field(graph: API_MEDIA)
Expand Down Expand Up @@ -5902,6 +5906,7 @@ input VideoUpdateInput @join__type(graph: API_MEDIA) {
keywordIds: [String!]
restrictDownloadPlatforms: [Platform!]
restrictViewPlatforms: [Platform!]
restrictAutoTranslations: Boolean
}

input VideoVariantCreateInput @join__type(graph: API_MEDIA) {
Expand Down
3 changes: 3 additions & 0 deletions apis/api-journeys/src/__generated__/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions apis/api-media/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,11 @@ type Video
id: ID!
label: VideoLabel!
locked: Boolean!

"""
When true, automated systems must not add dubbed audio variants or subtitle tracks to this video without express permission. Metadata translations (title, description, study questions) are unaffected.
"""
restrictAutoTranslations: Boolean!
primaryLanguageId: ID!
published: Boolean!
cloudflareAssets: [CloudflareR2!]!
Expand Down Expand Up @@ -1397,6 +1402,7 @@ input VideoUpdateInput {
keywordIds: [String!]
restrictDownloadPlatforms: [Platform!]
restrictViewPlatforms: [Platform!]
restrictAutoTranslations: Boolean
}

type VideoVariant {
Expand Down
3 changes: 2 additions & 1 deletion apis/api-media/src/schema/video/inputs/videoUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const VideoUpdateInput = builder.inputType('VideoUpdateInput', {
childIds: t.field({ type: ['String'], required: false }),
keywordIds: t.stringList({ required: false }),
restrictDownloadPlatforms: t.field({ type: [Platform], required: false }),
restrictViewPlatforms: t.field({ type: [Platform], required: false })
restrictViewPlatforms: t.field({ type: [Platform], required: false }),
restrictAutoTranslations: t.boolean({ required: false })
})
})
6 changes: 6 additions & 0 deletions apis/api-media/src/schema/video/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ const Video = builder.prismaObject('Video', {
id: t.exposeID('id', { nullable: false }),
label: t.expose('label', { type: VideoLabel, nullable: false }),
locked: t.exposeBoolean('locked', { nullable: false }),
restrictAutoTranslations: t.exposeBoolean('restrictAutoTranslations', {
nullable: false,
description:
'When true, automated systems must not add dubbed audio variants or subtitle tracks to this video without express permission. Metadata translations (title, description, study questions) are unaffected.'
}),
primaryLanguageId: t.exposeID('primaryLanguageId', { nullable: false }),
published: t.exposeBoolean('published', { nullable: false }),
cloudflareAssets: t.relation('cloudflareAssets', { nullable: false }),
Expand Down Expand Up @@ -794,6 +799,7 @@ builder.mutationFields((t) => ({
publishedAt: publishedAtUpdate,
slug: input.slug ?? undefined,
noIndex: input.noIndex ?? undefined,
restrictAutoTranslations: input.restrictAutoTranslations ?? undefined,
childIds: input.childIds ?? undefined,
restrictDownloadPlatforms:
input.restrictDownloadPlatforms ?? undefined,
Expand Down
7 changes: 2 additions & 5 deletions apps/journeys-admin/__generated__/GetTemplateGalleryPages.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- This migration was applied directly to the database and is being baselined locally.
-- It adds composite updatedAt+id indexes for efficient cursor-based pagination.
CREATE INDEX IF NOT EXISTS "CloudflareImage_updatedAt_id_idx" ON "CloudflareImage"("updatedAt", "id");
DROP INDEX IF EXISTS "Keyword_updatedAt_idx";
CREATE INDEX IF NOT EXISTS "Keyword_updatedAt_id_idx" ON "Keyword"("updatedAt", "id");
CREATE INDEX IF NOT EXISTS "VideoEdition_updatedAt_id_idx" ON "VideoEdition"("updatedAt", "id");
CREATE INDEX IF NOT EXISTS "VideoOrigin_updatedAt_id_idx" ON "VideoOrigin"("updatedAt", "id");
CREATE INDEX IF NOT EXISTS "VideoSubtitle_updatedAt_id_idx" ON "VideoSubtitle"("updatedAt", "id");
CREATE INDEX IF NOT EXISTS "VideoVariantDownload_updatedAt_id_idx" ON "VideoVariantDownload"("updatedAt", "id");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Video" ADD COLUMN "restrictAutoTranslations" BOOLEAN NOT NULL DEFAULT false;
1 change: 1 addition & 0 deletions libs/prisma/media/db/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ model Video {
noIndex Boolean?
childIds String[] // needed for child sort order
locked Boolean @default(false)
restrictAutoTranslations Boolean @default(false)
subtitles VideoSubtitle[]
children Video[] @relation("ParentChild")
parents Video[] @relation("ParentChild")
Expand Down
2 changes: 1 addition & 1 deletion libs/prisma/media/src/__generated__/pothos-types.ts

Large diffs are not rendered by default.

Loading
Loading