<commit_before>import * as yup from 'yup';

import { Game } from '../games';

type GameProposition = Pick<Game, 'name' | 'type'>;

export interface SummaryEntry {
  proposedGames: GameProposition[];
  selecetedForRemoval: string[];
  username: string;
}

const GamePropositionSchema = yup.object().shape({
  name: yup.string().required(),
  type: yup.string().required(),
});

const SummaryEntrySchema = yup.object().shape({
  proposedGames: yup.array().of(GamePropositionSchema),
  selectedForRemoval: yup.array().of(yup.string().required()),
  username: yup.string().required(),
});

export function isSummaryEntry(entry: SummaryEntry): entry is SummaryEntry {
  return SummaryEntrySchema.isValidSync(entry);
}

export interface Summary {
  createdAt: string;
  entries: SummaryEntry[];
}

export interface Vote {
  id: string;
  username: string;
  votedFor: string[];
}

export interface Poll {
  alreadyPlayed: string[];
  createdAt: string;<commit_msg>SummaryEntry api<commit_after>import * as yup from 'yup';

import { Game } from '../games';

type GameProposition = Pick<Game, 'name' | 'type'>;

export interface SummaryEntry {
  proposedGames: GameProposition[];
  selecetedForRemoval: string[];
  username: string;
}

const GamePropositionSchema = yup.object().shape({
  name: yup.string().required(),
  type: yup.string().required(),
});

const SummaryEntrySchema = yup.object().shape({
  proposedGames: yup.array().of(GamePropositionSchema).required(),
  selectedForRemoval: yup.array().of(yup.string().required()),
  username: yup.string().required(),
});

export function isSummaryEntry(entry: SummaryEntry): entry is SummaryEntry {
  return SummaryEntrySchema.isValidSync(entry);
}

export interface Summary {
  createdAt: string;
  entries: SummaryEntry[];
}

export interface Vote {
  id: string;
  username: string;
  votedFor: string[];
}

export interface Poll {
  alreadyPlayed: string[];
  createdAt: string;
{'fraction_non_alphanumeric': 0.14455958549222797, 'fraction_numerical': 0.0, 'mean_word_length': 5.415282392026578, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4399100', 'n_tokens_mistral': 589, 'n_tokens_neox': 595, 'n_words': 142}