import type { Location } from 'history'; import qs from 'qs'; import type { QueryParamConfig } from 'use-query-params'; import { z } from 'zod'; import type { ClusterTab } from './containers/Cluster/utils'; import type { NodePageQuery, NodeTab } from './containers/Node/NodePages'; import type { TenantQuery } from './containers/Tenant/TenantPages'; export declare const CLUSTER = "cluster"; export declare const DATABASE = "database"; export declare const NODE = "node"; export declare const PDISK = "pDisk"; export declare const VDISK = "vDisk"; export declare const STORAGE_GROUP = "storageGroup"; export declare const TABLET = "tablet"; declare const routes: { readonly homePage: "/home/:activeTab?"; readonly cluster: "/:environment?/cluster/:activeTab?"; readonly tenant: "/:environment?/database"; readonly database: "/:environment?/database"; readonly node: "/:environment?/node/:id/:activeTab?"; readonly pDisk: "/:environment?/pDisk"; readonly vDisk: "/:environment?/vDisk"; readonly storageGroup: "/:environment?/storageGroup"; readonly tablet: "/:environment?/tablet/:id"; readonly auth: "/:environment?/auth"; readonly legacyTenant: "/:environment?/tenant"; }; export default routes; export declare const parseQuery: (location: Location) => qs.ParsedQs; type Query = AnyRecord; export interface CreateHrefOptions { withBasename?: boolean; } export declare function createHref(route: string, params?: Record, query?: Query, options?: CreateHrefOptions, domain?: string): string; export declare const createExternalUILink: (query?: {}) => string; export declare function getLocationObjectFromHref(href: string): { pathname: string; search: string; hash: string; }; export type BaseQueryParams = { clusterName?: string; backend?: string; }; export type QueryParamsTypeFromQueryObject>> = { [QueryParamName in keyof T]?: Parameters[0]; }; export declare function getPDiskPagePath(pDiskId: string | number, nodeId: string | number, query?: Query, options?: CreateHrefOptions): string; export declare function getStorageGroupPath(groupId: string | number, query?: Query): string; export declare function getDefaultNodePath(params: { id: string | number; activeTab?: NodeTab; environment?: string; }, query?: NodePageQuery, options?: CreateHrefOptions): string; export declare const getClusterPath: (params?: { activeTab?: ClusterTab; environment?: string; }, query?: {}, options?: CreateHrefOptions, domain?: string) => string; export interface TenantPathOptions extends CreateHrefOptions { environment?: string; } export declare const getTenantPath: (query: TenantQuery, options?: TenantPathOptions) => string; export declare const homePageTabSchema: z.ZodEnum<{ clusters: "clusters"; databases: "databases"; }>; export type HomePageTab = z.infer; type HomePageQueryParams = BaseQueryParams & { env?: string; }; export declare function getHomePagePath(params?: { activeTab?: HomePageTab; }, query?: HomePageQueryParams, options?: CreateHrefOptions): string; export declare function getDatabasesPath(query?: HomePageQueryParams, options?: CreateHrefOptions): string; export declare function getClustersPath(query?: HomePageQueryParams, options?: CreateHrefOptions): string; export declare const tabletPageQueryParams: { readonly database: QueryParamConfig; readonly clusterName: QueryParamConfig; readonly activeTab: QueryParamConfig; readonly followerId: QueryParamConfig; }; type TabletPageQuery = QueryParamsTypeFromQueryObject; export declare function useVDiskPagePath(databaseOverride?: string): (params: { nodeId: string | number | undefined; vDiskId: string | undefined; }, query?: { activeTab?: string; clusterName?: string; }) => string | undefined; export declare function useStorageGroupPath(): (groupId: string | number, query?: Query) => string; export declare function useTabletPagePath(databaseOverride?: string): (tabletId: string | number, query?: TabletPageQuery) => string; export declare function checkIsHomePage(pathname: string): boolean; export declare function checkIsTenantPage(pathname: string): boolean; export declare function checkIsClusterPage(pathname: string): boolean;