UNPKG

@trivia-api/models

Version:

Models for The Trivia API.

57 lines (56 loc) 1.87 kB
import { V2Question } from '../../question/index'; /** * @openapi * components: * schemas: * SearchQuestionsResponse: * type: object * properties: * questions: * type: array * description: The questions that match the search criteria * items: * $ref: '#/components/schemas/V2Question' * totalHits: * type: number * description: The total number of questions that match the search criteria * perPage: * type: number * description: The number of questions returned per page * pageNumber: * type: number * description: The page number returned * totalPages: * type: number * description: The total number of pages when the current search criteria is applied. Sending a request with a page number greater than this will return an empty array of questions. * required: * - questions * - totalHits * - perPage * - pageNumber * - totalPages */ export type SearchQuestionsResponse = { /** * The questions that match the search criteria */ questions: V2Question[]; /** * The total number of questions that match the search criteria */ totalHits: number; /** * The number of questions returned per page */ perPage: number; /** * The page number returned */ pageNumber: number; /** * The total number of pages when the current search criteria is applied. * Sending a request with a page number greater than this will return an * empty array of questions. */ totalPages: number; };