@scalar/api-client
Version:
the open source API testing client
210 lines • 6.25 kB
TypeScript
import type { RouteLocationNormalized } from 'vue-router';
export declare enum PathId {
Request = "request",
Examples = "examples",
Cookies = "cookies",
Collection = "collection",
Schema = "schema",
Environment = "environment",
Servers = "servers",
Workspace = "workspace",
Settings = "settings"
}
/** Save the active workspace in localStorage for when the client reloads */
export declare function saveActiveWorkspace(to: RouteLocationNormalized): void;
/** Redirect to the saved workspace or the default workspace */
export declare function redirectToActiveWorkspace(): {
name: string;
params?: undefined;
} | {
name: string;
params: {
workspace: string;
};
};
/** Routes required by the API client modal */
export declare const modalRoutes: ({
name: string;
path: string;
redirect: typeof redirectToActiveWorkspace;
children?: undefined;
} | {
name: string;
path: string;
redirect: {
name: string;
params: {
workspace: string;
};
};
children?: undefined;
} | {
name: string;
path: string;
redirect: {
name: string;
params?: undefined;
};
children: {
name: string;
path: string;
component: () => Promise<typeof import("./views/Request/RequestRoot.vue.js")>;
redirect: (to: import("vue-router").RouteLocationGeneric) => {
name: string;
params: {
request: string;
};
};
children: ({
name: string;
path: string;
component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
redirect?: undefined;
children?: undefined;
} | {
name: string;
path: string;
component: () => Promise<typeof import("./views/Collection/Collection.vue.js")>;
redirect: () => {
name: string;
};
children: ({
name: string;
path: string;
component: () => Promise<typeof import("./views/Collection/CollectionOverview.vue.js")>;
children?: undefined;
} | {
name: string;
path: string;
component: () => Promise<typeof import("./views/Collection/CollectionServers.vue.js")>;
children: {
name: string;
path: string;
component: () => Promise<typeof import("./views/Collection/CollectionServers.vue.js")>;
}[];
})[];
})[];
}[];
})[];
/** Routes for the API client app */
export declare const routes: ({
name: string;
path: string;
redirect: typeof redirectToActiveWorkspace;
children?: undefined;
} | {
name: string;
path: string;
redirect: {
name: string;
params: {
workspace: string;
};
};
children?: undefined;
} | {
name: string;
path: string;
redirect: {
name: string;
params?: undefined;
};
children: ({
name: string;
path: string;
component: () => Promise<typeof import("./views/Request/RequestRoot.vue.js")>;
redirect: (to: import("vue-router").RouteLocationGeneric) => {
name: string;
params: {
request: string;
};
};
children: ({
name: string;
path: string;
component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
redirect?: undefined;
children?: undefined;
} | {
name: string;
path: string;
component: () => Promise<typeof import("./views/Collection/Collection.vue.js")>;
redirect: () => {
name: string;
};
children: ({
name: string;
path: string;
component: () => Promise<typeof import("./views/Collection/CollectionOverview.vue.js")>;
children?: undefined;
} | {
name: string;
path: string;
component: () => Promise<typeof import("./views/Collection/CollectionServers.vue.js")>;
children: {
name: string;
path: string;
component: () => Promise<typeof import("./views/Collection/CollectionServers.vue.js")>;
}[];
})[];
})[];
} | {
name: string;
path: string;
redirect: (to: import("vue-router").RouteLocationGeneric) => {
name: string;
params: {
environment: string;
};
};
component?: undefined;
props?: undefined;
} | {
name: string;
path: string;
component: () => Promise<typeof import("./views/Environment/Environment.vue.js")>;
redirect?: undefined;
props?: undefined;
} | {
name: string;
path: string;
component: () => Promise<typeof import("./views/Environment/Environment.vue.js")>;
props: true;
redirect?: undefined;
} | {
name: string;
path: string;
redirect: (to: import("vue-router").RouteLocationGeneric) => {
name: string;
params: {
cookies: string;
};
};
component?: undefined;
props?: undefined;
} | {
name: string;
path: string;
redirect: (to: import("vue-router").RouteLocationGeneric) => {
name: string;
params: {
collection: string;
servers: string;
};
};
component?: undefined;
props?: undefined;
} | {
name: string;
path: string;
redirect: (to: import("vue-router").RouteLocationGeneric) => {
name: string;
params: {
settings: string;
};
};
component?: undefined;
props?: undefined;
})[];
})[];
//# sourceMappingURL=routes.d.ts.map