/** * ObjectQL * Copyright (c) 2026-present ObjectStack Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ export type ApiMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD'; export interface ApiRequest { path: string; method: ApiMethod; headers: Record; query: Record; body?: unknown; protocol?: string; } export interface ApiResponse { status: number; headers?: Record; body: unknown; } export interface GatewayProtocol { name: string; route(request: ApiRequest): boolean; handle(request: ApiRequest): Promise; } export interface GatewayConfig { protocols: GatewayProtocol[]; }