UNPKG

@vepler/schools-types

Version:

TypeScript type definitions for Vepler Schools Service

52 lines (51 loc) 1.37 kB
/** * School By ID Endpoint Types * * Type definitions for the /schools/{id} API endpoint. */ import { ISchool } from '../../models/school'; import { ObjectApiResponse } from '../common'; /** * Path parameters for the /schools/{id} GET endpoint */ export interface SchoolByIdPathParams { /** * School ID to retrieve * @type integer */ _id: number; } /** * Query parameters for the /schools/{id} GET endpoint */ export interface SchoolByIdQueryParams { /** * Whether to include Ofsted reports in the response * @default true */ includeReports?: boolean; } /** * School details query options * Used for operations to query detailed school information */ export interface SchoolDetailsQueryOptions { /** School ID to retrieve */ schoolId: number; /** Range of years to query [start, end] */ range: number[]; /** Optional finance fields to include */ financeFields?: string[]; /** Optional pupil fields to include */ pupilFields?: string[]; } /** * Response data for the /schools/{id} GET endpoint * The school data is returned directly */ export type SchoolByIdResponseData = ISchool; /** * Complete response for the /schools/{id} GET endpoint * This returns an object, so it may be null in error cases */ export type SchoolByIdResponse = ObjectApiResponse<SchoolByIdResponseData>;