import { HTTPMethod, QPQConfigSetting, QpqFunctionRuntime } from 'quidproquo-core'; import { ApiKeyReference } from './apiKey'; interface GenericRouteAuthSettings { userDirectoryName?: string; scopes?: string[]; apiKeys?: T[]; } export interface ServiceAllowedOrigin { /** * The name of the api subdomain name for the given service */ api: string; /** * The domain name the service is hosted on, if left undefined, the domain name of this service will be used */ domain?: string; /** * The service name, as seen in the subdomain */ service?: string; /** * The protocol to use, defaults to https */ protocol?: 'http' | 'https'; } export interface GenericRouteOptions { allowedOrigins?: (string | ServiceAllowedOrigin)[]; routeAuthSettings?: GenericRouteAuthSettings; } export type RouteAuthSettings = GenericRouteAuthSettings; export type RouteOptions = GenericRouteOptions; export interface RouteQPQWebServerConfigSetting extends QPQConfigSetting { method: HTTPMethod; path: string; runtime: QpqFunctionRuntime; options: RouteOptions; } export declare const defineRoute: (method: HTTPMethod, path: string, runtime: QpqFunctionRuntime, options?: GenericRouteOptions) => RouteQPQWebServerConfigSetting; export {};