From 84ce544f4d5144744b54a0d35af24049993e0f71 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 9 Nov 2024 16:03:54 +0100 Subject: [PATCH] Add extra types (from #463). No backing store for now --- api/src/models/entry.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/src/models/entry.ts b/api/src/models/entry.ts index c2aff7e3..4f89451c 100644 --- a/api/src/models/entry.ts +++ b/api/src/models/entry.ts @@ -75,12 +75,24 @@ export const Special = t.Intersect( ); export type Special = typeof Special.static; +export const ExtraType = t.UnionEnum([ + "other", + "trailers", + "interview", + "behind-the-scenes", + "deleted-scenes", + "bloopers", + "mini-story", +]); +export type ExtraType = typeof ExtraType.static; + export const Extra = t.Intersect( [ BaseEntry, t.Object({ kind: t.Literal("extra"), number: t.Number({ minimum: 1 }), + extraType: ExtraType, // not sure about this id type externalId: EpisodeId, }),