@scalar/api-client
Version:
the open source API testing client
38 lines • 1.37 kB
TypeScript
import type { ClientPlugin } from '@scalar/oas-utils/helpers';
import type { Theme } from '@scalar/themes';
import type { ClientLayout } from '../../../../v2/types/layout';
type CreateApiClientOptions = {
/**
* The layout of the client, limited to web or desktop in app
* @see {@link ClientLayout}
*
* @default 'desktop'
*/
layout: Exclude<ClientLayout, 'modal'>;
/**
* Api client plugins to include in the app
*/
plugins?: ClientPlugin[];
/**
* Custom themes to include in the app
*/
customThemes?: Theme[];
/**
* Fallback theme slug to use if no theme is selected for the workspace
* @default 'default'
*/
fallbackThemeSlug?: string;
};
/**
* Creates the appropriate router with the appropriate routes based on the layout
*/
export declare const createAppRouter: (layout: CreateApiClientOptions["layout"]) => import("vue-router").Router;
/**
* Create the API Client with router and passes in the workspace store as a prop
*/
export declare const createApiClientApp: (el: HTMLElement | null, { layout, plugins, customThemes, fallbackThemeSlug }: CreateApiClientOptions) => Promise<{
app: import("vue").App<Element>;
state: import("../../../../v2/features/app/app-state.js").AppState;
} | undefined>;
export {};
//# sourceMappingURL=create-api-client-app.d.ts.map