import type { ApiAuth } from "../../client/APIV1Read"; import type { AuthScheme, AuthSchemeId, CodeSnippet, EndpointDefinition } from "../latest"; /** * Get the first auth scheme ID for an endpoint, preferring multiAuth over legacy auth. * multiAuth provides proper OR-of-AND semantics for endpoint-specific security. */ export declare function getFirstAuthSchemeId(endpoint: EndpointDefinition): AuthSchemeId | undefined; /** * Get the first auth scheme for an endpoint from the auths record. * Uses getFirstAuthSchemeId to select the correct auth scheme. */ export declare function getFirstAuthScheme(endpoint: EndpointDefinition, auths: Record): T | undefined; /** * Get the header name for an auth scheme. * Returns the header wire value for header auth, "Authorization" for bearer/OAuth, or undefined. */ export declare function getAuthHeaderName(auth: AuthScheme | ApiAuth | undefined): string | undefined; /** * Check if a snippet is likely auto-generated (not user-provided). * A snippet is considered likely generated if: * - generated === true, OR * - generated is undefined AND name, install, and description are all null */ export declare function isLikelyGeneratedSnippet(snippet: CodeSnippet): boolean; /** * Determine if a curl snippet should be regenerated because it has the wrong auth header. * Only regenerates if: * - No existing snippets exist, OR * - All existing snippets are likely generated AND none contain the expected header, OR * - For basic auth: existing snippets use -H "Authorization: Basic" instead of -u flag */ export declare function shouldRegenerateCurlSnippet(existingSnippets: CodeSnippet[] | undefined, expectedHeaderName: string | undefined, authScheme?: AuthScheme | ApiAuth): boolean; //# sourceMappingURL=auth-scheme.d.ts.map