import type { OpenApiDocument, OperationObject, ParameterObject, ReferenceType, SchemaObject, SchemaReferenceType } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'; /** * Extracts the names of every parameter on an operation. * * The returned strings contain only parameter names (e.g. `userId`, `limit`) so they can be indexed * as a high-signal field for search. Filter-style metadata like `REQUIRED`, `optional`, `query` and * the schema type are intentionally excluded — those tokens dilute fuzzy matches and produce false * positives for queries like `query` or `integer`. */ export declare function extractParameterNames(parameters: ReferenceType[]): string[]; /** * Extracts the descriptions of every parameter on an operation. * * Kept separate from parameter names so the search index can weight each independently. */ export declare function extractParameterDescriptions(parameters: ReferenceType[]): string[]; /** Extracts request-body property names, including nested objects, arrays, and compositions. */ export declare const extractBodyFieldNames: (operation: OperationObject) => string[]; /** Extracts request-body property descriptions separately from field names. */ export declare const extractBodyDescriptions: (operation: OperationObject) => string[]; /** Extracts schema property names using the shared bounded traversal. */ export declare const extractSchemaFieldNames: (schema: SchemaObject | undefined) => string[]; /** Extracts schema property descriptions using the shared bounded traversal. */ export declare const extractSchemaDescriptions: (schema: SchemaObject | undefined) => string[]; /** Search fields collected together without changing their independent ordering. */ type SchemaSearchFields = { names: string[]; descriptions: string[]; }; /** * Creates extraction caches for one synchronous index build. Discarding them after the build * ensures edits to existing schema objects are visible the next time search is indexed. * * Operations usually reference the same few schemas, and walking those is by far the most expensive * part of indexing, so each schema is walked once per build and its fields are shared. */ export declare const createSearchFieldExtractor: (includeRefSiblings?: boolean) => { schema: (schema: SchemaReferenceType | undefined) => SchemaSearchFields; body: (operation: OperationObject) => SchemaSearchFields; operation: (operation: OperationObject) => SchemaSearchFields; }; /** * Deep merge for objects. * * OpenAPI documents are untrusted input and can carry keys like `__proto__`, `constructor`, or * `prototype` (a schema is free to describe a property named `constructor`). Those keys are merged * as ordinary own data, so nothing is silently dropped, but the merge never writes through the * prototype chain, which would otherwise pollute `Object.prototype` for every object on the page. */ export declare function deepMerge(source: Record, target: Record): Record; /** * Creates an empty specification object. * The returning object has the same structure as a valid OpenAPI specification, but everything is empty. */ export declare function createEmptySpecification(partialSpecification?: Partial): { openapi: string; info: { title: string; description: string; termsOfService: string; version: string; license: { name: string; url: string; }; contact: { email: string; }; }; servers: never[]; tags: never[]; 'x-scalar-original-document-hash': string; }; export {}; //# sourceMappingURL=openapi.d.ts.map