UNPKG

@trivia-api/models

Version:

Models for The Trivia API.

43 lines (42 loc) 978 B
import { Question } from "./question"; /** * Sessions can be used to ensure that a user never receives the same set of questions */ export interface Session { /** * Unique identifier for the session */ id: string; /** * Total questions available to the session */ totalQuestions: number; /** * Remaining questions left in the session */ remainingQuestions: number; /** * Tags used to build session questions */ tags: string[]; /** * Categories used to build session questions */ categories: Question["category"][]; /** * Difficulty of questions in the session */ difficulty: Question["difficulty"] | null; /** * Region of the questions in the session */ region: string | null; /** * Timestamp that the session was created */ createdAt: Date; /** * Timestamp that the session was last updated */ updatedAt: Date; }