All files / shared/types/models programItem.ts

100% Statements 92/92
100% Branches 0/0
100% Functions 11/11
100% Lines 92/92

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159    436x 436x 436x 436x 436x 436x 436x 436x 436x 436x     436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x     436x 436x 436x 436x 436x 436x 436x 436x     436x 436x 436x 436x 436x     436x 436x 436x 436x 436x 436x 436x 436x     436x 436x 436x 436x 436x 436x 436x 436x 436x 436x     436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x 436x     436x 436x 436x     436x 436x 436x 436x 436x 436x 436x     436x 436x 436x 436x 436x 436x 436x     436x 436x 436x     436x                                                                                      
import { z } from "zod";
 
export enum ProgramType {
  TABLETOP_RPG = "tabletopRPG",
  LARP = "larp",
  TOURNAMENT = "tournament",
  WORKSHOP = "workshop",
  EXPERIENCE_POINT = "experiencePoint",
  OTHER = "other",
  ROUNDTABLE_DISCUSSION = "roundtableDiscussion",
  FLEAMARKET = "fleaMarket",
  OTHER_GAMING = "otherGaming",
}
 
export enum Genre {
  FANTASY = "fantasy",
  SCIFI = "scifi",
  HISTORICAL = "historical",
  MODERN = "modern",
  WAR = "war",
  HORROR = "horror",
  EXPLORATION = "exploration",
  MYSTERY = "mystery",
  DRAMA = "drama",
  HUMOR = "humor",
  ADVENTURE = "adventure",
}
 
export enum Gamestyle {
  SERIOUS = "serious",
  LIGHT = "light",
  RULES_HEAVY = "rulesHeavy",
  RULES_LIGHT = "rulesLight",
  STORY_DRIVEN = "storyDriven",
  CHARACTER_DRIVEN = "characterDriven",
  COMBAT_HEAVY = "combatHeavy",
}
 
export enum Language {
  FINNISH = "finnish",
  ENGLISH = "english",
  SWEDISH = "swedish",
  LANGUAGE_FREE = "languageFree",
}
 
export enum Tag {
  BEGINNER_FRIENDLY = "beginnerFriendly",
  THEME = "theme",
  LGBT = "lgbt",
  GUEST_OF_HONOR = "guestOfHonor",
  K16 = "k16",
  PRE_CONVENTION_WEEK = "preConventionWeek",
  USES_GEN_AI = "usesGenAi",
}
 
export enum AgeGroup {
  EVERYONE = "everyone",
  ADULTS = "adults",
  TEENS = "teens",
  ONLY_ADULTS = "onlyAdults",
  KIDS = "kids",
  SMALL_KIDS = "smallKids",
  ADULTS_AND_YOUTH = "adultsAndYouth",
  YOUNG_ADULTS = "youngAdults",
  FAMILIES = "families",
}
 
export enum InclusivityValue {
  COLOR_BLINDNESS = "colorBlindness",
  FINGERS = "fingers",
  LOUD_SOUNDS = "loudSounds",
  PHYSICAL_CONTACT = "physicalContact",
  LONG_PROGRAM = "longProgram",
  NOT_AMPLIFIED = "notAmplified",
  NO_RECORDING_OR_SPOKEN_TEXT = "noRecordingsOrSpokenText",
  DARK_LIGHTING = "darkLighting",
  NO_MOVEMENT = "noMovement",
  NO_TEXT_OF_RECORDING = "noTextOfRecording",
  LONG_TEXTS = "longTexts",
  LOTS_OF_MOVEMENT = "lotsOfMovement",
  FLASHING_LIGHTS = "flashingLights",
  QUICK_REACTIONS = "quickReactions",
  NO_SUBTITLES = "noSubtitles",
  STRONG_ODOURS = "strongOdours",
  IRRITATING_CHEMICALS = "irritatingChemicals",
}
 
export enum ProgramItemSignupStrategy {
  DIRECT = "direct",
  LOTTERY = "lottery",
}
 
export enum SignupType {
  KONSTI = "konsti",
  OTHER = "other",
  NOT_REQUIRED = "notRequired",
  EXPERIENCE_POINT = "experiencePoint",
  ROPE_LARP_DESK = "ropelarp",
  GAMEPOINT = "gamepoint",
}
 
export enum Popularity {
  NULL = "notSet",
  LOW = "low",
  MEDIUM = "medium",
  HIGH = "high",
  VERY_HIGH = "veryHigh",
  EXTREME = "extreme",
}
 
export enum State {
  ACCEPTED = "accepted",
  CANCELLED = "cancelled",
}
 
export const ProgramItemSchema = z.object({
  programItemId: z.string(),
  parentId: z.string(),
  title: z.string(),
  description: z.string(),
  location: z.string(),
  startTime: z.string(),
  mins: z.number(),
  tags: z.array(z.enum(Tag)),
  ageGroups: z.array(z.enum(AgeGroup)),
  genres: z.array(z.enum(Genre)),
  styles: z.array(z.enum(Gamestyle)),
  languages: z.array(z.enum(Language)),
  endTime: z.string(),
  people: z.string(),
  minAttendance: z.number(),
  maxAttendance: z.number(),
  gameSystem: z.string(),
  popularity: z.enum(Popularity),
  shortDescription: z.string(),
  revolvingDoor: z.boolean(),
  programType: z.enum(ProgramType),
  contentWarnings: z.string(),
  otherAuthor: z.string(),
  accessibilityValues: z.array(z.enum(InclusivityValue)),
  signupStrategy: z.optional(z.enum(ProgramItemSignupStrategy)),
  otherAccessibilityInformation: z.string(),
  entryFee: z.string(),
  signupType: z.enum(SignupType),
  state: z.enum(State),
});
 
export type ProgramItem = z.infer<typeof ProgramItemSchema>;
 
export interface ProgramItemWithUserSignups {
  programItem: ProgramItem;
  users: UserSignup[];
}
 
export interface UserSignup {
  username: string;
  signupMessage: string;
}