import * as Effect from 'effect/Effect'; import type * as OpenApiParser from './OpenApiParser.js'; declare const SecurityParseError_base: new = {}>(args: import("effect/Types").Equals extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & { readonly _tag: "SecurityParseError"; } & Readonly; /** * Error when parsing security schemes * * @since 1.0.0 * @category Errors */ export declare class SecurityParseError extends SecurityParseError_base<{ readonly message: string; }> { } /** * API Key security scheme * * @since 1.0.0 * @category Models */ export interface ApiKeySecurityScheme { readonly type: 'apiKey'; readonly name: string; readonly in: 'header' | 'query' | 'cookie'; readonly description?: string; } /** * HTTP security scheme (basic, bearer, etc.) * * @since 1.0.0 * @category Models */ export interface HttpSecurityScheme { readonly type: 'http'; readonly scheme: string; readonly bearerFormat?: string; readonly description?: string; } /** * OAuth2 flow configuration * * @since 1.0.0 * @category Models */ export interface OAuth2Flow { readonly authorizationUrl?: string; readonly tokenUrl?: string; readonly refreshUrl?: string; readonly scopes: Record; } /** * OAuth2 security scheme * * @since 1.0.0 * @category Models */ export interface OAuth2SecurityScheme { readonly type: 'oauth2'; readonly flows: { readonly authorizationCode?: OAuth2Flow; readonly implicit?: OAuth2Flow; readonly password?: OAuth2Flow; readonly clientCredentials?: OAuth2Flow; }; readonly description?: string; } /** * OpenID Connect security scheme * * @since 1.0.0 * @category Models */ export interface OpenIdConnectSecurityScheme { readonly type: 'openIdConnect'; readonly openIdConnectUrl: string; readonly description?: string; } /** * Union of all security scheme types * * @since 1.0.0 * @category Models */ export type SecurityScheme = ApiKeySecurityScheme | HttpSecurityScheme | OAuth2SecurityScheme | OpenIdConnectSecurityScheme; /** * Security requirement (scheme name + required scopes) * * @since 1.0.0 * @category Models */ export interface SecurityRequirement { readonly [schemeName: string]: ReadonlyArray; } /** * Parsed security schemes from OpenAPI spec * * @since 1.0.0 * @category Models */ export interface ParsedSecurity { readonly schemes: Map; readonly globalRequirements: ReadonlyArray; } /** * Parse security schemes from OpenAPI components * * @since 1.0.0 * @category Parsing */ export declare const parseSecuritySchemes: (components?: OpenApiParser.ComponentsObject) => Effect.Effect, SecurityParseError>; /** * Parse security requirements from OpenAPI spec * * @since 1.0.0 * @category Parsing */ export declare const parseSecurityRequirements: (security?: ReadonlyArray>>) => ReadonlyArray; /** * Parse all security information from OpenAPI spec * * @since 1.0.0 * @category Parsing */ export declare const parseSecurity: (spec: OpenApiParser.OpenApiSpec) => Effect.Effect; export {}; //# sourceMappingURL=SecurityParser.d.ts.map