UNPKG

tbarequest

Version:

A wrapper to fetch data from The Blue Alliance API

26 lines (25 loc) 1 kB
import { teamEndpoints } from "./teams.js"; import { statusEndpoints } from "./status.js"; import { eventEndpoints } from "./events.js"; import { matchEndpoints } from "./matches.js"; import { districtEndpoints } from "./districts.js"; import { regionalAdvancementEndpoints } from "./regionalAdvancements.js"; import { insightEndpoints } from "./insights.js"; import { type } from "arktype"; const Search_Index = type({ teams: type({ key: "string", nickname: "string", }).array(), events: type({ key: "string", name: "string", }).array(), }); export const searchIndex = { "/search_index": { schema: Search_Index, arguments: type([]), }, }; export const endpoints = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, statusEndpoints), teamEndpoints), eventEndpoints), matchEndpoints), districtEndpoints), regionalAdvancementEndpoints), insightEndpoints), searchIndex);