@scalar/api-client
Version:
the open source API testing client
10 lines • 811 B
TypeScript
import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth';
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
/**
* Resolves which security selection to use for an operation.
* Priority: operation-level selection, then document-level selection, then a default.
* When neither level has a selection, returns the first security requirement unless
* authentication is optional or there are no requirements, in which case returns no selection.
*/
export declare const getSelectedSecurity: (documentSelectedSecurity: SelectedSecurity | undefined, operationSelectedSecurity: SelectedSecurity | undefined, securityRequirements?: NonNullable<OpenApiDocument["security"]>) => SelectedSecurity;
//# sourceMappingURL=get-selected-security.d.ts.map