UNPKG

@scalar/api-client

Version:

the open source API testing client

20 lines 1.34 kB
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'; import type { XCodeSample } from '@scalar/workspace-store/schemas/extensions/operation'; import type { ClientOptionGroup } from '../../../../v2/blocks/operation-code-sample/types'; /** Helper to generate an ID for custom code samples */ export declare const generateCustomId: (example: XCodeSample) => string; /** * Generates client options for the request example block by filtering and organizing * built-in snippets based on the hiddenClients configuration. This function creates * a structured list of available client options that can be used to generate code * examples for different programming languages and frameworks. * * The function filters built-in clients based on the hiddenClients parameter and * groups them by their category (e.g., JavaScript, Python, etc.). The hiddenClients * parameter supports multiple formats: * - boolean: true to hide all clients * - array: ['fetch', 'axios'] to hide specific clients across all categories * - object: { node: true, python: ['requests'] } to hide entire categories or specific clients within categories */ export declare const generateClientOptions: (hiddenClients: ApiReferenceConfiguration["hiddenClients"]) => ClientOptionGroup[]; //# sourceMappingURL=generate-client-options.d.ts.map