UNPKG

@scalar/api-client

Version:

the open source API testing client

101 lines 4.79 kB
import type { HttpMethod } from '@scalar/helpers/http/http-methods'; import type { WorkspaceStore } from '@scalar/workspace-store/client'; import type { WorkspaceEventBus } from '@scalar/workspace-store/events'; import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'; import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'; import type { Workspace } from '../../../../v2/features/app/hooks/use-workspace-selector.js'; import type { ClientPlugin } from '../../../../v2/helpers/plugins.js'; import type { ClientLayout } from '../../../../v2/types/layout'; /** These props are provided at the route level */ export type RouteProps = { documentSlug: string; document: WorkspaceDocument | null; eventBus: WorkspaceEventBus; layout: ClientLayout; path?: string; method?: HttpMethod; exampleName?: string; environment: XScalarEnvironment; workspaceStore: WorkspaceStore; activeWorkspace: Workspace; plugins: ClientPlugin[]; }; /** When in the collections pages */ export type CollectionProps = RouteProps & ({ collectionType: 'document'; document: WorkspaceDocument; } | { collectionType: 'workspace'; document: null; }); /** Routes for the API client app and web, the same as modal + workspace routes */ export declare const ROUTES: ({ path: string; children: ({ path: string; children: ({ name: string; path: string; component: import("vue").DefineComponent<RouteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; children?: undefined; } | { name: string; path: string; component: import("vue").DefineComponent<RouteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; children: ({ name: string; path: string; redirect: { name: string; }; component?: undefined; } | { name: string; path: string; component: import("vue").DefineComponent<(RouteProps & { collectionType: "document"; document: WorkspaceDocument; }) | (RouteProps & { collectionType: "workspace"; document: null; }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(RouteProps & { collectionType: "document"; document: WorkspaceDocument; }) | (RouteProps & { collectionType: "workspace"; document: null; })> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; redirect?: undefined; })[]; })[]; name?: undefined; component?: undefined; } | { name: string; path: string; component: import("vue").DefineComponent<RouteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; children: { name: string; path: string; component: import("vue").DefineComponent<(RouteProps & { collectionType: "document"; document: WorkspaceDocument; }) | (RouteProps & { collectionType: "workspace"; document: null; }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(RouteProps & { collectionType: "document"; document: WorkspaceDocument; }) | (RouteProps & { collectionType: "workspace"; document: null; })> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; }[]; })[]; redirect?: undefined; } | { path: string; redirect: () => string; children?: undefined; })[]; //# sourceMappingURL=routes.d.ts.map