import { RouteConfiguration } from "@zuplo/runtime";
import { OpenAPIV3_1 } from "openapi-types";
import type { ErrorObject } from "./ajv.js";
export type ValidationResult = {
  isValid: boolean;
  errors: ErrorObject[];
  warnings: ErrorObject[];
};
type Modify<T, R> = Omit<T, keyof R> & R;
export type ZuploHttpMethods = OpenAPIV3_1.HttpMethods | string;
export declare const ZUPLO_OPEN_API_VENDOR_PREFIX = "x-zuplo";
export declare const OPEN_API_INTERNAL_PROPERTY_VENDOR_TAG = "x-internal";
export declare const ZUPLO_OPEN_API_PATH_KEY: "x-zuplo-path";
export declare const ZUPLO_OPEN_API_ROUTE_KEY: "x-zuplo-route";
export type ZuploOpenApiDocument = Modify<
  OpenAPIV3_1.Document<ZuploOpenApiOperationExtension>,
  {
    paths: ZuploOpenApiPathsObject | undefined;
  }
>;
export type ZuploOpenApiPathsObject = Record<
  string,
  ZuploOpenApiPathItemObject | undefined
>;
export type ZuploOpenApiPathItemObject = Modify<
  OpenAPIV3_1.PathItemObject<ZuploOpenApiOperationExtension> &
    ZuploOpenApiPathItemExtension,
  {
    get?: ZuploOpenApiOperationObject;
    put?: ZuploOpenApiOperationObject;
    post?: ZuploOpenApiOperationObject;
    delete?: ZuploOpenApiOperationObject;
    options?: ZuploOpenApiOperationObject;
    head?: ZuploOpenApiOperationObject;
    patch?: ZuploOpenApiOperationObject;
    trace?: ZuploOpenApiOperationObject;
  }
>;
export type ZuploOpenApiPathItemExtension = {
  [ZUPLO_OPEN_API_PATH_KEY]?: ZuploOpenApiPathItemProperties;
};
export type ZuploOpenApiPathItemProperties = {
  pathMode: PathMode;
};
export type PathMode = "open-api" | "url-pattern";
export type ZuploOpenApiOperationObject = Modify<
  OpenAPIV3_1.OperationObject<ZuploOpenApiOperationExtension>,
  {
    operationId: string;
  }
>;
export type ZuploOpenApiOperationProperties = Omit<
  RouteConfiguration,
  | "operationId"
  | "path"
  | "methods"
  | "label"
  | "key"
  | "summary"
  | "description"
  | "parameters"
  | "responses"
  | "tags"
  | "version"
  | "raw"
>;
export type ZuploOpenApiOperationExtension = {
  [ZUPLO_OPEN_API_ROUTE_KEY]?: ZuploOpenApiOperationProperties;
  [OPEN_API_INTERNAL_PROPERTY_VENDOR_TAG]?: boolean;
};
export {};
//# sourceMappingURL=interfaces.d.ts.map
