import { NextResponse } from 'next/server'; /** * This route provides an endpoint for a client side fetch request to call * the `findAll()` method on the Place Model. It should be imported into a theme * at `app/api/places/route.ts` and called inside the exported GET function. * * The GET function in the theme takes in the request as an argument which should * in turn be passed to this function as an argumet. * * @example * ```tsx * import '../../../api'; * * import routes from '../../../routes'; * * export async function GET(request: Request) { * return routes.places.index(request); * } * ``` * * The endpoint can then be called at `/api/places` with the place name being * included as a `name` query parameter. * * @exmaple * ```tsx * const placesResponse = await fetch(`/api/places?name=${q}`); * ``` */ export default function index(request: Request): Promise | NextResponse<{ place: null; errors: import("../../models/model").ModelError[]; }> | NextResponse<{ place: import("../../models/place.types").HestiaPlaceData | undefined; errors: null; }> | NextResponse<{ results: [string | null, string | null, string | null][] | null; errors: import("../../models/model").ModelError[] | null; }>>; //# sourceMappingURL=places-index.d.ts.map